Adding a design button or field

  • Thread starter Thread starter Christopher Danello
  • Start date Start date
C

Christopher Danello

I have a form that is based on a query. The query is
based on a date. Is there something I can add to the form
(a button or field or code) that will allow me to change
the query date without have to leave to form?

Thanks,
CD
 
-----Original Message-----
I have a form that is based on a query. The query is
based on a date. Is there something I can add to the form
(a button or field or code) that will allow me to change
the query date without have to leave to form?

Thanks,
CD
.

CD, you can add a textbox to your form thatwhere you type
the date you want to query on. Then in your query you
reference that textbox in your criteria. i.e.

Forms![GetData]![EndDate]

the easiest way is use the Expression Builder and just
select the control you want to use for your criteria.

Then on your form either 1)create a command button with a
requery as the event procedure. or 2) Add a requery
method to the Afterupdate event for that control.

Mike
 
Thanks. I'll try that.

CD
-----Original Message-----
-----Original Message-----
I have a form that is based on a query. The query is
based on a date. Is there something I can add to the form
(a button or field or code) that will allow me to change
the query date without have to leave to form?

Thanks,
CD
.

CD, you can add a textbox to your form thatwhere you type
the date you want to query on. Then in your query you
reference that textbox in your criteria. i.e.

Forms![GetData]![EndDate]

the easiest way is use the Expression Builder and just
select the control you want to use for your criteria.

Then on your form either 1)create a command button with a
requery as the event procedure. or 2) Add a requery
method to the Afterupdate event for that control.

Mike
.
 
Back
Top