My database is working perfectly on my computer which has access 2002, but when its running on a computer that has 2002 runtime i get the following error when its compiled in an mde:
"The expression you entered On Click as the event property setting produced the following error: .
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been and error evaluating the function, event, or macro."
If I run it as the mdb then it gives me a runtime error and crashes.
I've found for previous problems of this nature that I am most likely missing a reference, but after I first saw this problem I, personally, copied the dlls im using to the computer, and registered them. I found the code that is causing this problem by commenting it out and rerunning the program with no errors. The problem is that this section of code works PERFECT on my computer.
This is a function in a module that i am calling from another form.
What missing reference would cause this code not to work?
Thanks for your help
-Pete
"The expression you entered On Click as the event property setting produced the following error: .
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been and error evaluating the function, event, or macro."
If I run it as the mdb then it gives me a runtime error and crashes.
I've found for previous problems of this nature that I am most likely missing a reference, but after I first saw this problem I, personally, copied the dlls im using to the computer, and registered them. I found the code that is causing this problem by commenting it out and rerunning the program with no errors. The problem is that this section of code works PERFECT on my computer.
Code:
Public Sub MovePhysicalInventory()
'===============================
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("tblPhysicalInventory")
Dim rst2 As DAO.Recordset
Set rst2 = db.OpenRecordset("tblTempPhys")
rst2.MoveFirst
Do Until rst2.EOF
rst.AddNew
rst![StoreNum] = Right("00000" & rst2![locationid], 5)
rst![Month] = Left(rst2![phys_invty_dt], 4) & Mid(rst2![phys_invty_dt], 6, 2)
rst![ItemNum] = rst2![raw_item_num]
rst![TotalUnits] = rst2![raw_item_invty_qty]
rst.Update
rst2.MoveNext
Loop
'===============================
rst.Close: Set rst = Nothing
rst2.Close: Set rst2 = Nothing
db.Close: Set db = Nothing
End Sub
This is a function in a module that i am calling from another form.
What missing reference would cause this code not to work?
Thanks for your help
-Pete