Record source

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

Can i have 2 record sources of a single cell.

For instance if I pay $200 for a book. The accounting
entries should be withdrawal from bank $200 and expenses
$200. Therefore can I enter the data in the bank form
while that data automatically goes to the expenses table
as well.
 
You're asking can you have two controls source for a single control? No.

You can use VBA code to copy the value from one control that is bound to one
field, into a second control that is bound to a different field; just be
sure you're using a query that contains both fields as the form's
recordsource.
 
Thanks.

I would be most appreciate if you could provide me with
more details on how to use VBA code?

I know how to create a query containing two fields, but
then what should I do?

Dennis
 
An example using the AfterUpdate event of the first control:

Private Sub ControlName1_AfterUpdate
Me.ControlName2.Value = Me.ControlName1.Value
End Sub
 
Back
Top