Auto-Filling 2 Form Fields

JamesJoey

Registered User.
Local time
Today, 11:53
Joined
Dec 6, 2010
Messages
642
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.
 
I'm typing in the values myself. That's the purpose of my wanting to auto-fill these.
 
That is not what auto-fill means. "auto-fill" means having the program fill the fields using code to either calculate or find the "default" values. What you are doing is manually filling the form fields. You've given us a red-herring. We're trying to figure out where you want to get the values from and that isn't what you want at all:(
OK. Then how do I get it to enter the data for me?
 
@OP,
In your tblChecking, you are saving "Payee". Are you intending this to be saves by value, so if you change the entry in the Payee table it WON'T reflect?
As important, you have nothing related to credit or debit in your payee table. At this point I can't tell what you are actually trying to do.
 

Users who are viewing this thread

Back
Top Bottom