View Full Version : Replacing most recent record


Paul Oakley
12-11-2007, 12:34 AM
Hi, Im building a DB that basically tracks the hours people have worked,
its all going fine apart from one major bug which i cant get my head around, I am trying to work out a way so that if someone decides to change the hours they have worked it replaces the existing record and does not create a new record.

Each record has a unique user ID attached and each day is dated, do you think this is a VBA solution or a change in the relationships perhaps?

Sorry fi there is already a similar answer to this question on the forum, but i couldnt find one!:confused:

Thanks in advance,

Paul

tehNellie
12-11-2007, 01:43 AM
Seems to me like you might need to tinker with your existing forms and offer the option to enter new hours or edit existing hours. if they select Edit you might need to have them select the relevant date etc, and then then issue an UPDATE query against the relevant record. If they choose 'enter New' they'll enter the relevant details and you'll issue an INSERT INTO query against the relevant table(s).

Rabbie
12-11-2007, 02:01 AM
The simplest way would be if your form is bound to a query then the user can just edit the relevant record on the form and this will be saved automatically.