G
Guest
I can't figure out how to do this!
Here's my situation:
I have a form (form1) that displays records (from table1) associated with a
specific record on a different table (table2). In the header of form1 I have
fields where the user can 'build' a new record to add to table1.
I want to verify before adding the new record that it doesn't conflict with
an existing record on table1 (basically, that the start/end dates don't
overlap a record in the table1).
I have a query (query1) in Access that I can open to see if the existing new
record (from form1) has dates that overlap an existing record of the same
type in table1.
I want to have the button from form1 that you click to add the record first
open query1 and see if it returned any results (found an overlapping record).
If it does, I will show a warning and stop the process. If no overlapping
records are found, I'll kick off an append query to add the records, then
refresh my form to show the new record.
I can't for the life of me get the query to open as a recordset. I must
have gone through a dozen examples on this part of the group and none work.
Any ideas?
Here's my situation:
I have a form (form1) that displays records (from table1) associated with a
specific record on a different table (table2). In the header of form1 I have
fields where the user can 'build' a new record to add to table1.
I want to verify before adding the new record that it doesn't conflict with
an existing record on table1 (basically, that the start/end dates don't
overlap a record in the table1).
I have a query (query1) in Access that I can open to see if the existing new
record (from form1) has dates that overlap an existing record of the same
type in table1.
I want to have the button from form1 that you click to add the record first
open query1 and see if it returned any results (found an overlapping record).
If it does, I will show a warning and stop the process. If no overlapping
records are found, I'll kick off an append query to add the records, then
refresh my form to show the new record.
I can't for the life of me get the query to open as a recordset. I must
have gone through a dozen examples on this part of the group and none work.
Any ideas?