Auto-Filling 2 Form Fields (1 Viewer)

JamesJoey

Registered User.
Local time
Today, 17:11
Joined
Dec 6, 2010
Messages
641
I have a table which similar to a checking registry.
I also have a Payee field in my 'tblPayees' table which I use to autofill a Payee field via split form's combo box, in a checking table tblFinances.
tblFinances also has 2 other fields Credit and Debit.
I want to be able to auto-fill the Credit and Debit fields when I select a payee form the combo box. (I used the combo box wizard to create this combo box.)
tblPayee has 2 fields (PayeeID and Payee.

Is there an easy way to accomplish this?

Thanks,
James
 
Does the query for your combo already contain "Credit" and "Debit"? If so, reference those columns from the selected entry in your combobox.

Me.Combobox.Selected(1) would give you the selected value in the 2nd column.
 
No. The combo box is populated by tblPayees which has on 2 fields PayeeID and PayeeName
 
How is tblFinances related to tblPayees? If you have a way to link the two, you can grab your credit/debit fields.

If they are not related, what criteria do you use to identify your credit and debit?
 
The only link between tblPayees and tblFinances is the Payee.
I have PayName in tblPayees and the Payee field inn tblFinances.
I simply select a PayeeName from the combo box and it gets stored in Payee in tblFinances.
The credit and debit fields are in tblFinances.
 
What are you going to autofill them with? :unsure:
When I entered a transactions in my small volunteer system, I had to say whether it was a Credit or Debit? I just called them Deposit or Payment.
I only had one field for the Amount. If it was a debit, then that got changed to a negative.
That way I just had to sum for any client to get their balance.
1746083653213.png
 
I have a Debit and a Credit because I don't have to remember to place a negative sign in front of the Debit value.
Although I don't have Debit and Credit fields in tblPayees, only in tblFincnaces,
 
The only link between tblPayees and tblFinances is the Payee.
I have PayName in tblPayees and the Payee field inn tblFinances.
I simply select a PayeeName from the combo box and it gets stored in Payee in tblFinances.
The credit and debit fields are in tblFinances.
Then do a left join in your source query on tblFinances to grab both credit and debit.
 
I have a Debit and a Credit because I don't have to remember to place a negative sign in front of the Debit value.
Although I don't have Debit and Credit fields in tblPayees, only in tblFincnaces,
I did not either. The system did that.
 
So I need to add a Debit and Credit field to tblPayees?
No. You would just need to do a left join in the source of your query if you want to auto-fill from tblFinances. Then you can grab from the dropdown as they would be the last two columns in your drop down.
 
No. You would just need to do a left join in the source of your query if you want to auto-fill from tblFinances. Then you can grab from the dropdown as they would be the last two columns in your drop down.
Is there a join wizard? Not sure how to create one.
Do I need to modify the current qry?
 
I want to be able to auto-fill the Credit and Debit fields when I select a payee form the combo box
Auto-fill them with what? You haven't told us what values you want to fill them with. But you can also use their default values property to fill them when a new record is created. But you have to tell ACCESS what you want to fill the fields with.
 
I posted the structure of the 2 tables.
I want to autofill the Debit and Credit fields when I select a Payee from a Combobox.
tblChecking.png
tblPayees.png
 
I guess you didn't understand #16.

Obviously since Debit and Credit are Currency fields they would be populated by currency values.
 
Obviously since Debit and Credit are Currency fields they would be populated by currency values.
But where are the values coming from? You keep talking about automatically populating them but with WHAT VALUES? Are there defaults somewhere? That seems very unlikely for currency values.
 

Users who are viewing this thread

  • Back
    Top Bottom