Here is my subform SQL statement:
SELECT tblJobs.*, tblRolodex.*
FROM tblRolodex INNER JOIN tblJobs ON tblRolodex.CompanyName =
tblJobs.ClientName
WHERE (((tblRolodex.CompanyName) Like nz([Forms]![frmSearch]![cboName],"*"))
AND ((tblRolodex.State) Like
nz([Forms]![frmSearch]![cboCompanyLocation],"*")) AND ((tblJobs.JobNumber)
Like nz([Forms]![frmSearch]![cboNumber],"*")) AND ((tblJobs.Code) Like
nz([Forms]![frmSearch]![cboCode],"*")) AND ((tblJobs.ProjectLocation) Like
nz([Forms]![frmSearch]![cboProjectLocation],"*")));
When I select a company name, for example, my subform does not populate even
when money is the following VBA statement in the AfterUpdate event of my
cboName drop-down list. Any ideas?
Ofer said:
Create a record source for the sub form based on the combo's
Select * From MyTable Where MyField1 Like
nz(Forms![MainFormName]![Combo1Name],"*") AND MyField2 Like
nz(Forms![MainFormName]![Combo2Name],"*") AND MyField3 Like
nz(Forms![MainFormName]![Combo3Name],"*")
If no value enter in the combo it will returns all values for that field,
using NZ
I have a number of drop-down lists (5) that contain search criteria on my
main form, and I have a subform that has fields that I want populated based
on the above drop-down lists. Any ideas on how to accomplish this?