L
laavista
I'm using Access 2003.
I have two forms, f_MilBase and f_Contact. Both have the field “BaseCodeâ€
On form f_MilBase, I have a command button. On Click, I wish to have form
f_Contact open with just the records for the BaseCode populated in f_MilBase
BaseCode is a text field, 5 char
Examples of BaseCodes in the db: 5234E or Beale
On click, the following code is executed:
If Not Me.NewRecord Then
DoCmd.OpenForm "f_contact", _
WhereCondition:="BaseCode=""" & Me.BaseCode & """"
End If
I get "enter parameter value", but when I enter nothing in the box and click
OK, it filters correctly.
Any help would be greatly appreciated!
I have two forms, f_MilBase and f_Contact. Both have the field “BaseCodeâ€
On form f_MilBase, I have a command button. On Click, I wish to have form
f_Contact open with just the records for the BaseCode populated in f_MilBase
BaseCode is a text field, 5 char
Examples of BaseCodes in the db: 5234E or Beale
On click, the following code is executed:
If Not Me.NewRecord Then
DoCmd.OpenForm "f_contact", _
WhereCondition:="BaseCode=""" & Me.BaseCode & """"
End If
I get "enter parameter value", but when I enter nothing in the box and click
OK, it filters correctly.
Any help would be greatly appreciated!