Hi, I am running an .adp accessing data on SQL Server 2008.
I'm trying to take a value from a field and use it to show only records that match that value in a continuous form. I programmed a button to run:
Dim whereString As String
whereString = "[Employee First]='" & Me.txtTest.Value & "'"
DoCmd.OpenForm "test_form", , , WhereCondition:=whereString
when i run the code it worked for the first test value but now I can't get the form to update with any new values I enter in the field.
Examining the continuous form in design mode, I noticed in the property sheet that the ServerFilter property takes the contents of the WhereCondition string but it does not update to reflect the new WhereCondition strings when I change the value in the field and re-run the code.
Am I missing something here?
To be verbose, an example is:
txtTest field is currently "Jeff"
whereString contains "[Employee First]='Jeff'"
initial run of docmd.openform code sets ServerFilter property to "[Employee First]='Jeff'"
close continuous form
change txtTest field to "Donald"
whereString contains "[Employee First]='Donald'"
running docmd.openform code again opens continuous form but ServerFilter property is still "[Employee First]='Jeff'"
I appreciate your time!
I'm trying to take a value from a field and use it to show only records that match that value in a continuous form. I programmed a button to run:
Dim whereString As String
whereString = "[Employee First]='" & Me.txtTest.Value & "'"
DoCmd.OpenForm "test_form", , , WhereCondition:=whereString
when i run the code it worked for the first test value but now I can't get the form to update with any new values I enter in the field.
Examining the continuous form in design mode, I noticed in the property sheet that the ServerFilter property takes the contents of the WhereCondition string but it does not update to reflect the new WhereCondition strings when I change the value in the field and re-run the code.
Am I missing something here?
To be verbose, an example is:
txtTest field is currently "Jeff"
whereString contains "[Employee First]='Jeff'"
initial run of docmd.openform code sets ServerFilter property to "[Employee First]='Jeff'"
close continuous form
change txtTest field to "Donald"
whereString contains "[Employee First]='Donald'"
running docmd.openform code again opens continuous form but ServerFilter property is still "[Employee First]='Jeff'"
I appreciate your time!