Programmers...

Daxton A.

Registered User.
Local time
Today, 22:58
Joined
Dec 30, 2002
Messages
65
How do I write to a query using code? The query is based on suppliers. But if my query returns null and i output the query to a spreadsheet. My spreadsheet program will not know where to put the data because it doesnt know which supplier the spreadsheet refers to. So, i need to be able to hardcode in the supplier's name and the associated date range. Which those to inputs are already gathered from a data entry form that runs the query. Just need to be able to transfer them to the appropriate fields in the query.
Hope I have provided enuff info.
Thanks ahead of time to whomever can solve this.

Daxton Allen
 
Just add the fields to the query. If the fields are on a form, pull the data from the form (form has to be open). Since the query is based on these fields, you must have them to include in the query. Maybe I am not understanding the question.
 
REPLY

the question is:
What is the code to write to a query that has already been ran.
Say it comes back null.

Currently my code is:

DoCmd.OpenQuery "qrySupplierRating"
DoCmd.OutputTo_
acOutputQuery, "qrySupplierRating", "MicrosoftExcel_
(*.xls)", , False
DoCmd.Close

________________________________

I need to check the query's field for null and then
place The Supplier's Name and the Date from the
Form into the query before outputting.
 

Users who are viewing this thread

Back
Top Bottom