Here is my db . I am trying to search the Quoting form accessed through the A Main Menu
I am coding a search button on a form based on a Query. If I want my search to return on the value of one of the table fields does the code need to refer to the Query or the table?
The on click code
Me.SearchText.SetFocus
Me.FilterOn = False
Me.Filter = " [Calendar_Strata_1Q].[StrataPlanNr] like '% " & SearchText & "%' "
Me.FilterOn = True
Me.Requery
The StrataPlanNr originates in the StrataPlan_T. The Query references Calendar_T and StrataPlan_T
SearchText is an unbound text box.
Matthew,
I would like to help you with your issue. I took a look at the sample Access file you posted today. I would like to confirm a few things.
I believe we are working with the following objects:
Form: Calendar List_F_C
Record Source:
Calendar_Strata_1Q
I need more information to properly debug. I notice one of the fields on the querydef (
Calendar_Strata_1Q) was removed. The field was: Strataplan_t.SearchItem. You posted the SQL of the querydef last Saturday. After you posted the sample database today, Tuesday, the field was removed. Why did you remove that field?
I am not sure I am looking at the form where you are having problems. You said you are trying to search the
Quoting Form (Quoting_Detail F_C) from the main menu. That form does not match the screenshot of the form you submitted today. I looked at all the forms and it appears the name of the form in the screenshot is
Calendar_Strata_1Q. Is that the form in question? What form has the issues?
I could not find the VBA code you posted on Friday. What object, on what form has this code behind it? Is this object a button? What is the name of the button? You said the VBA code is attached to an "on click" event. Unfortunately, I can't find the VBA code you referenced on Friday in today's Access file. Where is this VBA code? Did you remove it?
Would you please confirm/answer my questions? Your answers will help the debugging process. Thanks.