Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form to Query

Status
Not open for further replies.

MMTechniques

Programmer
Dec 29, 2002
5
US
Ok, basically I am going to make this small form which actually submits to a query. So I can make this form show all fields, and I can specify the "Criteria" I want for each field (or no criteria at all). Then have that form submit to a query which takes the submitted information and displays the results. I don't want someone to take 45 minutes in making an example database just for me, but if you could tell/point me in the right direction as of how to do this I would be most grateful.

I have Office 2000 Professional and I've searched through the help files of Access and Visual Basic and I didn't see a "Form to Query" area of help. Is this even possible?
 
Well, let me rephrase a bit. I mean, can I get the form to submit to a query, become a query, or dynamically create a query and then delete the query from the database when the results window is closed.
 
Possible? Yes. Reasonalbe? perhaps not.

consider what you are asking it is the functional equivalent of the query builder / grid -which is already available

so for each table, there needs to be a mechanisim to select any set of fields - ao even calculated values based on the fields

for each selected field, be able to select multiple criteria - and relate these to the criteria in other fields

now, you are almost past the easy part, with only the decision on sorting remaining in the 'easy' category


think about the multi-table queries, as the question of joins will start to tax most programmers, not in the writting of the clause, but in the diversity of options available


thankfully, you did imply limiting the query to NOT include action queries, but you did fail to eliminate cross-tabs, unions ... so there is a bit of effort here - again, how would the form present these selctions

some more ... but it is late and old brains get tired of the explination.


MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Hi...

Just download the QueryByForm-DB from Microsoft called QBF.ZIP it has exactly what you're looking for... it's an Access '97 Tool but it works

cu
 
Ok, I read what they had to say, but they only do a few criterias, like 2-4, I'm doing about 18 criterias. Here is the dope. I used one of the sample codes that microsoft offered.

Like "*" & Forms!QueryForm!LogType & "*" Or Forms!QueryForm!LogType Is Null

I do similar criteria's on all 18 something fields in the query, a couple are "Between......." criterias.

I spent some time and remade a query from scratch and ran the form I made. It actually did work as much as I wanted it to. I then closed the database and reopened it, and from then on, it locks up when I run the query. It shows a solid white box with the first word of the first record that is returned in the results. After about 1 minute of no response, I get an error about not having enough memory. If I zipped this database and uploaded it, would any of you mind taking a look, or seeing if it does the same for you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top