G
Guest
I have a table that contains records with both a time field and a date field.
i have a form that displays the records, however i only dwant a certain
number of records displayed, namely those within a certain date/time block.
I am planning on another form that will set up a query to "fill" the first
form.
so, here's the setup. btlCoils is the main table with all the records.
frmSFR is the form that displays the records from the selected block. frmSFR
is based off of qrySFRRorm. frmChangeDateTime is the form that will generate
the SQL tatement for qrySFRForm. good enough?
now, on the change date and time form, there are 4 fields, start/end time
and start/end date. (event blocks may carry over from night one day to
morning the next day) i was thinking i need a union query to accomplish this.
would the sql statement look something like
SELECT ( list of tbl.field) FROM tblCoils WHERE ((tblCoils.Date)>= "start
date" AND (tblCoils.Time)>="start time")
UNION
SELECT ( list of tbl.field) FROM tblCoils WHERE ((tblCoils.Date)<= "end
date" AND (tblCoils.Time)<="finish time")
???
this statement would be generated in VBA, then placed into the qrySFRForm,
the query would then run, then the form frmSFRRorm would run.
am i missing anything?
thanks
i have a form that displays the records, however i only dwant a certain
number of records displayed, namely those within a certain date/time block.
I am planning on another form that will set up a query to "fill" the first
form.
so, here's the setup. btlCoils is the main table with all the records.
frmSFR is the form that displays the records from the selected block. frmSFR
is based off of qrySFRRorm. frmChangeDateTime is the form that will generate
the SQL tatement for qrySFRForm. good enough?
now, on the change date and time form, there are 4 fields, start/end time
and start/end date. (event blocks may carry over from night one day to
morning the next day) i was thinking i need a union query to accomplish this.
would the sql statement look something like
SELECT ( list of tbl.field) FROM tblCoils WHERE ((tblCoils.Date)>= "start
date" AND (tblCoils.Time)>="start time")
UNION
SELECT ( list of tbl.field) FROM tblCoils WHERE ((tblCoils.Date)<= "end
date" AND (tblCoils.Time)<="finish time")
???
this statement would be generated in VBA, then placed into the qrySFRForm,
the query would then run, then the form frmSFRRorm would run.
am i missing anything?
thanks