Newbie table access in VB question

lroy1978

Registered User.
Local time
Yesterday, 16:02
Joined
Jan 11, 2006
Messages
22
Hi All,
I'm using a small piece of VB code that is driven by an event (After_Update) from a form.

I would like to take a number generated by my code and place it within a field
within a specific table.

For example I would like to place the number 2 in the field called 'Product' which belongs to the table called 'Problem'.

I take it I also need to work out the current record that is being viewed in the
form in order to reference the table correctly. How can I do this?

Many thanks
Lee
 
Lets say the field you are updating is called 'fld_number'
and that the field you want to change when fld_number is updated is 'fld_quantity' - and that this field is on the same form.

Then you would use the following code:

Private Sub fld_number_AfterUpdate()
fld_quantity.Value = fld_number.Value

End Sub


Hope this helps :)
 

Users who are viewing this thread

Back
Top Bottom