You also have a form with two comboboxes:
cboStore
RecordSource: SELECT [tblStore].[StoreID], [tblStore].[StoreName] FROM
tblStore;
cboManager
RecordSource: SELECT [tblManager].[ManagerID], [tblManager].[StoreID],
[tblManager].[ManagerName] FROM tblManager;
You only want those managers visible that are in the store that has been
selected from cboStore.
To do this you will need to modify the cboManager RecordSource in the
AfterUpdate event of cboStore:
code:
Private Sub cboStore_AfterUpdate()
Dim sManagerSource As String
You can apply this concept of having the value of one control affect the
value of another by keeping in mind the AfterUpdate event of the first
control is where you want to take the action on the second control.
I want a user to be able to choose a value from a table and then do a query
on the main table looking for records which have the chosen value somewhere
in one of several fields. To keep it simple, I will give an example using the
Parameter field.
I would like to have the user select a value for [Param] on a form, press
the GetRecords button and display only those records which contains the
keyword chosen from the Param list which in the Resp2Comm.Param field of the
master table. So,
if the user selects CPO, the query should look for records Like "*CPO*"
Here is my attemp to perform this query:
SQL = "SELECT Resp2Comm.Param, Resp2Comm.Comment, Resp2Comm.Response FROM
resp2comm WHERE ((Resp2Comm.Param = " & Chr(34) & "Like " & Chr(34) & "*" &
Me![Param] & "*" & Chr(34) & "));"
I get a Syntax error in string in query expression '((Resp2Comm.Param =
"*CPO*"));'. error message. I've tried various alternate coding using the "
and ' characters; but do not seem to be able to resolve this error.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.