G
Guest
Good afternoon,
***************************************
Goal:
I am trying to set up a form that searches Customer orders by name and
timeframe (between a start date and end date) and starts by a prompt to enter
a start date, end date, and a Customer's First Name, Last name and show this
Customer's name in the main form, and all their orders between start date and
end date in a subform.
***************************************
Structure: I currently have 2 tables I am using to store data, first is
Customer Information table which includes First Name, Last Name, email, etc,
and Order Table which includes, order specifics and description. I am using
autonumber in Customer Info table as primary key and joined this to Order ID
in Order table (set for duplicates OK) creating a 1 to many relationship.
I am also using a parameter queries to prompt a user to enter First name,
Last Name for main query, and a second parameter query to prompt for Start
Date and End Date to be used on subform.
***************************************
Issues: I can't seem to join these parameter queries in a form and subform.
I tried to create a form from these but got a message saying "these objects
cannot be joined by the wisard". So I had to either make referentially
unenforceable join between them in the relationships or not build a form.
But, I found I could create a form using my Customer Info table for primary
form, and paremater query for orders for a subform. That seems to be working
except I tried to enter wrong data in the prompt to see if it handled error
checking ok and my subform parameter query comes up blank for no matching
records fine, but my primary form (Customer Info table) automatically
populates data for the first record in the First and Last name boxes. What
should I do so that if no records are returned by the query, these boxes will
appear blank instead of showing the first record data? Or am I using the
right methodology to create such a form and subform mentoned in first
sentence of this post? Thanks.
***************************************
Goal:
I am trying to set up a form that searches Customer orders by name and
timeframe (between a start date and end date) and starts by a prompt to enter
a start date, end date, and a Customer's First Name, Last name and show this
Customer's name in the main form, and all their orders between start date and
end date in a subform.
***************************************
Structure: I currently have 2 tables I am using to store data, first is
Customer Information table which includes First Name, Last Name, email, etc,
and Order Table which includes, order specifics and description. I am using
autonumber in Customer Info table as primary key and joined this to Order ID
in Order table (set for duplicates OK) creating a 1 to many relationship.
I am also using a parameter queries to prompt a user to enter First name,
Last Name for main query, and a second parameter query to prompt for Start
Date and End Date to be used on subform.
***************************************
Issues: I can't seem to join these parameter queries in a form and subform.
I tried to create a form from these but got a message saying "these objects
cannot be joined by the wisard". So I had to either make referentially
unenforceable join between them in the relationships or not build a form.
But, I found I could create a form using my Customer Info table for primary
form, and paremater query for orders for a subform. That seems to be working
except I tried to enter wrong data in the prompt to see if it handled error
checking ok and my subform parameter query comes up blank for no matching
records fine, but my primary form (Customer Info table) automatically
populates data for the first record in the First and Last name boxes. What
should I do so that if no records are returned by the query, these boxes will
appear blank instead of showing the first record data? Or am I using the
right methodology to create such a form and subform mentoned in first
sentence of this post? Thanks.