Help with query

Did you put it where SOS asked you to put it? Which is?
 
in the criteria on the query, it did work until i closed the database then went back in
 
You must have changed something. Probably something to do with renaming field names or ...?
 
i dont think so,

If i remove the criteria and open mainmenu form then add the criteria back in the query it works up until i close and reopen the mainmenu or close and reopen the database
 
Where or what is monthtext ?
 
still if i remove the criteria from the query it will open the form and then if i keep the form open and place the criteria back into the query it works. Just not when I close the form and reopen it.

I have been through the VB coding on the form and cannot see anything wrong except two previous buttons coding (the monthtext) ones,

am I missing something??
 
Private Sub Command11_Click()
monthtext = DateAdd("m", -1, monthtext)
End Sub
Private Sub Command12_Click()
monthtext = DateAdd("m", 1, monthtext)
End Sub

On your main menu form
 
Rich do you have any ideas on what the issue is?
 
Your main form has data from the queries that the control source some of your text boxes on the same form are based on, since the form is trying to open before you can pass any parameters to the queries you will get the errors that you are getting.
Just have a form that allows you to pass those parameters to the relevant queries first and you and then control the data sources of your text boxes
 
I have created a new form and put the combo boxes on and changed the query criteria to point at them but i still am getting the same error when I try and open the form
 
I have created a new form and put the combo boxes on and changed the query criteria to point at them but i still am getting the same error when I try and open the form
What's on the "new" form
 
The problem is with your Percent query which is your main form's record source.

However, this is the bulk of your problem:
1. You have 5 tables NONE of which are related (SERIOUS NORMALIZATION needed).
2. You have 31 queries; 32 forms; 32 reports.

All for just 5 tables:eek:. Lots of redundancy there. At this stage whatever we do wouldn't help your database but would bring more calamity and confusion. Our solutions are designed for relational databases. This is why we've spent a long time trying to give you a solution when in actually fact a solution cannot be reached due to the state of your objects.

Conclusion: From what I've seen you don't understand the basic concepts of a relational database. My advise would be to get yourself with grips with the basics first by picking up some books. Here are some good tutorials that would help:

Access 2003 VBA

Access 2007 VBA

Remember, google is your friend too.

The other option is to leave it for the professionals if you don't have the time. You really don't want to be giving wrong figures to your customers.

If however you decided to do some (thorough) reading, once you've gotten your db sorted, you'll find what we've been trying to relay to you trivial.
 

Users who are viewing this thread

Back
Top Bottom