问题描述
PrivateSubMDIForm_Initialize()DimmpathAsStringmpath=App.PathIfRight(mpath,1)<>""Thenmpath=mpath+""Data1.DatabaseName=mpath+"vbdata.mdb"Data1.RecordSource="access"EndSubPrivateSubCommand1_Click()IfData1.Recordset.EOFThenData1.Recordset.MoveFirstIfData1.Recordset.EOFThen//有问题MsgBox"nofind!",vbYesNo,"Unfind"LoadMDIForm1MDIForm1.ShowText1(0)="":Text1(1)=""ElseData1.Recordset.MoveNextEndIfEndSub
解决方案
解决方案二:
改成如下就行了:Data1.RecordSource="access"'首先确定你有名为access这个表,否则设为表名或查询语句Data1.Refresh'主要是加这句EndSubPrivateSubCommand1_Click()'Data1.refreshIfData1.Recordset.EOFThenData1.Recordset.Move
时间: 2025-01-23 03:34:22