Query By Form

accessma

Registered User.
Local time
Yesterday, 22:13
Joined
Sep 17, 2006
Messages
54
I have an unusual problem. I have a form called frmSample. On the form are several combo boxes which the user can select different criteria and then the query collects the entries, selects the records and loads them into the form called frmProject. There are lots of problems getting it to work so I decided to take each combo box in order to get them to work.

The current problem is this. When you select a name from the "Contact" combo box, it is supposed to select any record that the chosen contact is working on. This is working but with one twist. The first three names all throw an error saying there is a syntax error in my IN statement which if you step through and look at the statement you see something like this:

Code:
IN(, 1,2,3,)

Obviously the first ProjectID is being stripped out causing this error. What I cant figure out is why this is occurring on the first three names only. The other names work fine without exception.

The code that runs that is causing the problem is a function called BuildPredicate. It is fired when the "Select Records" button below the combo boxes on the frmSample is clicked. There is a STOP right after the Dim statements so you can step through the code. You will have to uncomment it to use it.

I would appreciate any thoughts of why this is acting so hit and miss.


Have to upload the FE and BE seperatly because of size.
 

Attachments

Users who are viewing this thread

Back
Top Bottom