Help writing SQL query
Posted on 2001-06-26
Can someone please Help
I have a rather complex sql query I've been trying to write for a number of weeks, but somehow keep stuffing it up, and I'm ready to rip my hair out (as well as the hair of anyone else who happens to walk by)
I'm trying to write a program for myself that will help me budget my money better, the only problem is that while I can write simple programs, I've had very little need for sql in the past and I'm having enormous problems with the syntax etc. I've obtained a number of VB/Access books from the local library but I finding it a bit of a struggle.
I have form with four dropdown combo boxes, that provide imformation on search criteria for 5 fields in an Access Database
The Database Name is "Budget.mdb"
The Table Name is "Finance"
The Field Names are:
0. [Bill Name] (text Field)
1. [Payment Type] (text field)
2. [Priority] (integer field)
3. [Due Date] (date/time field)
4. [To Pay Date] (date/time field)
5. [Paid Date] (date/time field)
Combo1 does a search on "All Payment types or just one selected type"
The database field name to be searched is [Payment Type]
Combo1.AddItem "All Payment Types"
Combo1.AddItem "Credit Card"
Combo1.AddItem "Direct Debit"
Combo2 does a search on "Priority type" field
The databasefield name is [Priority]
Combo2.AddItem "All Priorities"
Combo3 does a search on one of 3 Fields
The database field names to be searched are either [Due Date], [Pay Date] or [Paid Date]
Combo3.AddItem "Due Date"
Combo3.AddItem "To Pay Date"
Combo3.AddItem "Paid Date"
Combo4 then restricts the search to "All Dates" in the database ; or "between two dates" which are entered into 2 seperate text boxes (text1 & text2)
Combo4.AddItem "All Dates"
Combo4.AddItem "Selected Dates"
Can anyone help write this for me as I'm at my wits end.