|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
I copied all the objects from one db to another. in the new db i get a compile error in my vba code. this is strange since it runs fine in the original db on the same machine. it is almost as if by copying over the objects (using "get external data", "import") i am not copying over some stuff necessary to make vba run properly (hidden tables?)
the message is "Compile error: method or data member not found". It points to the text in red below. Private Sub Form_Close() Dim myform As Recordset Set myform = Me.RecordsetClone Dim tran As Recordset, mydb As Database Set mydb = DBEngine.Workspaces(0).Databases(0) Set tran = mydb.OpenRecordset("tblMemberTransactions", dbOpenTable) myform.MoveFirst If myform.GiftAmt <> 0 And Not IsNull(myform.GiftAmt) Then tran.AddNew tran.GiftAmt = myform.GiftAmt tran.MemberID = MemID GiftAmt appears to be a valid data (currency) box in the subform, and in the tblMemberTransactions. I get similar errors in some other vba behind forms as well. Any ideas?? |
|
#2
|
|||
|
|||
|
The error indicates there is no GiftAmt control or variable on your form.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
copied vba code
any idea why and exact copy would have these kinds of problems? ever see this before?
|
|
#4
|
|||
|
|||
|
problems with copied vba code
any idea why and exact copy would have these kinds of problems? ever see this before?
|
|
#5
|
|||
|
|||
|
Why don't you use the debugger and step through your code. You should be able to easily find the missing object(s).
Sounds like your copy didn't copy everything, or the missing control isn't available on the target machine, or your versions of Access are different. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > problems running copied vba code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|