Full Version: Form Vba Conversion
UtterAccess Forums > Microsoft® Access > Access Forms
sforney123
I am convertnig my embedded macros on my forms in Access 2007 so I can run my database for users of Access 2003. After I ran the conversion I get the following error on my forms when I hit the command button. "Microsoft Office Access can't find the name 'Combo1' you entered in the expression." Below is my code. Anyway to fix this?
#39;------------------------------------------------------------
' NewGateProfile_Click
'
'------------------------------------------------------------
Private Sub NewGateProfile_Click()
On Error GoTo NewGateProfile_Click_Err
If (Eval("IIf([Combo1] Is Null,True,False)")) Then
Beep
MsgBox "Please select an Airport Code before proceeding", vbOKOnly, ""
End If
If (Eval("IIf([Combo1] Is Null,True,False)")) Then
End
End If
DoCmd.OpenForm "Gate Entry", acNormal, "", "[Master].[Airport Code]=[Forms].[Open1].[Combo1]", acAdd, acNormal
NewGateProfile_Click_Exit:
Exit Sub
NewGateProfile_Click_Err:
MsgBox Error$
Resume NewGateProfile_Click_Exit
End Sub
sforney123
I resolved this issue just add Forms.Form Name before the Combo1
JonSmith
Me.Combo1 should also work, just fyi for the future
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.