How to get a particular field from a table as criteria in a query?

  • Thread starter hkgary33 via AccessMonster.com
  • Start date
H

hkgary33 via AccessMonster.com

Dear all,
In my database, I have a table named tblMemoPeriod, which only stores one
number field & one record named “MemoPeriod” to store the default period (in
days) of a memo. I’ve also built a form named frmChangePeriod so that the
user can change the default period of a memo, and then the “MemoPeriod” field
will be updated. Now I need to create a query that search out those files
with the memo field expired. For example, in file 1, its MemoDate field is
2006-06-18, and the MemoPeriod is set to be 30, and say today is 2006-07-20,
so suppose file 1 should be shown after the query.
But in the criteria field of the query, how can I get the value of MemoPeriod
field from a table and use it as a criterion?
Thanks!
Gary
 
D

Duane Hookom

If I understand correctly and tblMemoPeriod has only one record, you can add
it to your query and place the field in the criteria. I doubt this query
will be updateable.

If you need it to be updateable, don't add the table to your query and set
your criteria using something like:
DLookup("MemoPeriod", "tblMemoPeriod")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top