Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a module in an update query

Status
Not open for further replies.

Hfnet

IS-IT--Management
Dec 31, 2003
369
GB
I want to update a table field using a query.

I have a module called GetDay, which calculates elapsed weekdays. This works perfectly.

I want to use an update query to change the value of a field in a table to show the elapsed days between the start and end dates in the same field. The code I am using is:

UPDATE DaysOnSystem SET DaysOnSystem.DaysIn = GetDay("DateIn","DateOut");


And I get an error "Data type mismtach in criteria expression"

Does this mean I cannot call the module from an update query? If not, how can I?
 
Something like this ?
UPDATE DaysOnSystem SET DaysIn = GetDay(DateIn,DateOut)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks, it was the quotes that were messing about!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top