Record source

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.
 
K

Ken Snell

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.
 
D

Dennis

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
 
K

Ken Snell

An example using the AfterUpdate event of the first control:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top