marco condition

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wanted to run my update query base on the the record count of my table.
Is it possible to be done using condition marco?

I have my query like

"SELECT COUNT(*) FROM MYTABLE"

I wnated to run my update quesry base on this select query.

Any informaiton is great appreciated,
 
You want to run the update query based on how many records are in the table?
Use the DCount function:
DCount("*", "MYTABLE")

It returns the number of records in the table. If there are no records, it
returns a value of 0.
 
Thanks for the informaiton,
Can I compare a field data not on the form?
For example,

Can I use
Mytable.Myfield = date() as a condition?

Thanks again,
 
Not directly, but you can use the DLookup function to get the value from a
field in a table; but if MyTable has more than one record, you'll need to
also provide a criterion expression to tell DLookup which record to get. See
Help file for more details, and post back if you have questions.
 
Back
Top