09-27-14, 11:56 #1Registered User
- Join Date
- Sep 2014
Unanswered: NOVICE! Issues with parameter dialogue message on Navigation Form
I'm a novice (self teaching) and I'm trying to create an Access db to replace a current Excel db. I have created a Form w/multiple combo boxes that filter a subform query. On its own, the form is working like I had hoped. I can open the form without any "parameter dialogue messages appearing".
However, when I try adding that form into my NavigationForm the "parameter messages" pop up for every combo box. Is there way to suppress this so the subform on the NavigationForm opens up exactly like it does if I launched it as a stand-alone report.
I apologize now if my terminology is basic. Again, I'm self-taught using forums and YouTube. This is my 1st actual post to ask for help. Thanks in advance!
09-29-14, 09:17 #2Registered User
Provided Answers: 25
- Join Date
- Apr 2014
You cant use form boxes in a query if there's nothing in them..so..
Test all controls for a possible filter then build the sql.
dim sSql as string, sWhere as string if not isnull(cboState) then sWhere = sWhere & " and [state]='" & cboState & "'" if not IsNull(txtName) then sWhere = sWhere & " and [Name]='" & txtName & "'" if not IsNull(chkContact) then sWhere = sWhere & " and [Contact]=" & chkContact.value 'remove 1st And sWhere= mid(sWhere,4) sSql = "SELECT * FROM tblCompany WHERE " & sWhere frmResults.Recordsource = sSql
09-29-14, 14:46 #3Moderator
Provided Answers: 19
- Join Date
- Jun 2005
- Richmond, Virginia USA
If that were the problem, it would have shown up when the Form was run independently, and it didn't; everything worked then. I run 2007, and so have no experience with Navigation Forms, but when a Form is added to a Navigation Form that Form then becomes a Subform, and the Controls on it have to be referenced differently. I suspect that the RowSources for these Comboboxes reference Controls on the Form/Subform and they have to be addressed differently, now. Here's a link that shows how to do that:
Forms: Refer to Form and Subform properties and controls
Linq ;0)>Hope this helps!
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007