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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a field on a form

Status
Not open for further replies.

Fibee

Programmer
Jul 26, 2002
39
GB
Hi

I have a problem which probably has a really simple answer! I have a blank field on a form which I want to update with todays date when a button is clicked. I have created a macro to do this but at the moment it puts the date in all the records and not the current one displayed. How to I get access to only put the date on the record I am currently on?

I have also made the field an unbound text box as as soon as I make it a field from a table Access complains about it being a control on a read-only form or about the value being too large. What am I doing wrong?

Any help is appreciated!

Thanks

Fi
 
I have a form which displays current bookings of resources. When the user wishes to return an item I use an update statement to change a specific field. The way i get the specific record updated is to get the user to enter the ID number of the record to update in a text box. They get the ID number from the current bookings list. When the user hits a button it runs the UPDATE statement.

DoCmd.RunSQL "UPDATE tblbookings SET Status = 'Returned' WHERE (((tblbookings.ID)=[Forms]![frmReturns]![txtRecordNo]));
 
Thanks Jaydeebe, I'll give it ago!
 
If you're using continuous forms, as I suspect, the field must be bound. If left unbound, you will get the same results in every record.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top