Problem with bound field refresh on a form

  • Thread starter Thread starter bvd81
  • Start date Start date
B

bvd81

Guest
Hello All,

I am new to Access and VB and have gained some very very useful tips from this site whilst compiling my new project.

I have a question which I have been unable to find anywhere here.

I have two tables at the moment. One is the main table from which my form is created. My second table is a list of registrations and the corresponding number of current hours accrued by the registration (eg ABC has 512 hours used)

I query the rego table on my main form to give me a listbox so that for each new record, the user can select the rego, and the starting hours are automatically filled in the 'Start hours' field on the form (using an after update event to set the hours after the rego is selected), which is bound to the 'Start Hours' Field on the main table, so that when it is saved, the info saves to my main table.

When the user returns, they then enter their Finish hours, and this finish hours is then written to the rego table, so that next time the rego is selected the start hours is the same number as the finish hours from the last time the item was used.

Now for the problem. Users can fill out some parts of the form, and take it before the finishing hours are entered for the previous record. Therefore, when they return to enter their finishing hours, the starting hours hasn't updated on the form, and it doesn't change unless they reselect the rego from the list box to trigger the after update event.

Is there any way, (I have tried, Me.Refresh, Requery etc) I can get the after update event to fire in the current form automatically, ie without having to reselect the same rego again? Is there a way to just refresh the rego field so that it thinks that it has updated and triggers the after update?

I may have now made it clear as mud, but this is my first post so any help would be very much appreciated. I can elaborate on any problems if needs be.

Thanks in advance for your help!
 
Last edited:
This is a design issue. Relational databases are not sequential flat files. The starting value should be calculated in your report rather than permanently stored.
 

Users who are viewing this thread

Back
Top Bottom