Good afternoon, gentlefolk. Thank you for taking the time to review my problem.
I've got a form with a tabbed subform on it. In one of the tabs (and, eventually, all of the tabs) I've got a bound subform in which I'm trying to filter the recordset using an unbound combo box. Here's the code I'm using:
Code:
Me.RecordSource = "SELECT tblExpeditedShipping.* " & vbCrLf & _
"FROM tblExpeditedShipping LEFT JOIN tblRushTeam ON tblExpeditedShipping.DispensingSite = tblRushTeam.Site " & vbCrLf & _
"WHERE (((tblExpeditedShipping.Complete)=""No"") AND ((tblExpeditedShipping.RequestSelection)=[Forms]![frmExpedited]![cboFilterRequest]) AND ((tblRushTeam.LANID)=[Forms]![frmExpedited]![txtUserLANID2]));"
Me.Requery
I'm not getting an error message, but Access throws up an entry box asking for [Forms]![frmExpedited]![cboFilterRequest] and then [Forms]![frmExpedited]![txtUserLANID2], which kinda defeats two-thirds of the WHERE clause. The SQL is formatted as it is as I found and downloaded a db online that converts SQL to VBA with a button click (that db name is 'SQL2VBA' - don't have the address where I got it anymore).
I would appreciate any help that anyone could provide. I've got several other unbound combo boxes that I'll be using as filters, so as soon as I get the code right on this first one, it's all downhill from there. Please advise if I've been unclear or if you have any questions. Thanks!