Autofilter in a form using query

  • Thread starter Thread starter Mike D.
  • Start date Start date
M

Mike D.

I'm having a brain fart for something that seems simple -

I have a form that references a query for info. I want
the form to automatically update with the record
information when the DATE field is entered (for either
new entry or editting).
In my query, I have the DATE criteria as - [Forms]![Form]!
[Date]

It's just not working and I can't think of how to get it
to work. Do I need to somehow "autoupdate" the form??
Thank you for your help.
 
I don't really understand your objective. Rewrite it with a little more
explanation, as there are many possibilities.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
OK, here's a better explanation -

I have a query and a form that have the following fields -
DATE, MACHINE#, WORK ORDER#, PIECES PRODUCED

The DATE is the primary key and cannot be duplicated.

My form shows the date and all fields, (with today as
default). I want the form to show the entries that go
with today's date, or if the date was changed to
something else to automatically update the other fields
for that date.

In other words, I want the form to start with the record
with the current date. If the date was changed, I want
the form to change appropriately (without having to click
a button to "refresh" the form).

Mike
-----Original Message-----
I don't really understand your objective. Rewrite it with a little more
explanation, as there are many possibilities.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Mike D. said:
I'm having a brain fart for something that seems simple -

I have a form that references a query for info. I want
the form to automatically update with the record
information when the DATE field is entered (for either
new entry or editting).
In my query, I have the DATE criteria as - [Forms]! [Form]!
[Date]

It's just not working and I can't think of how to get it
to work. Do I need to somehow "autoupdate" the form??
Thank you for your help.


.
 
Mike said:
OK, here's a better explanation -

I have a query and a form that have the following fields -
DATE, MACHINE#, WORK ORDER#, PIECES PRODUCED

The DATE is the primary key and cannot be duplicated.

My form shows the date and all fields, (with today as
default). I want the form to show the entries that go
with today's date, or if the date was changed to
something else to automatically update the other fields
for that date.

In other words, I want the form to start with the record
with the current date. If the date was changed, I want
the form to change appropriately (without having to click
a button to "refresh" the form).
You cannot have one field perform two functions: both data entry and lookup.

I suggest you make the DATE field unbound (DATE is not a wise name for a
table field; the word is recognized by Access), make it a combobox. Set
its rowsource to "SELECT [DATE] FROM yourtable ORDER BY DATE"
(optionally: DESC). You can use the NotInList event to go to a new
record; you can use the Click event to go to the corresponding existing
record.
 
Back
Top