Auto-Filling 2 Form Fields

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:(
 
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?
 
OK. Then how do I get it to enter the data for me?
I feel like I'm in a loop. How do I know? You haven't told us where the data should come from? This isn't magic. If you want certain controls to default to certain values, YOU need to write code to do that or define the defaults in the table definition or in the control properties.
 
@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.
 
Ok. I'll try to explain this one more time.
You have a split form. Split form has rows and columns. Right??
Split form has 3 columns: 'Payee' 'Debit' Credit.'
Lets say there is no data at all being displayed in the spit form.

This is where it gets tricky.

Lets say I type "John Doe" in the Payee column. Then I type $10.00 in the Debit column. The value can go in either Debit or Credit but not both.
I save it.
Tomorrow, I add a new record. I type "John Doe" in the Payee column. and put nothing in the credit or debit columns.
After saving the record I want the $10.00 to automatically be place d in the Debit column because that was the last value I put in for "Jahn Doe."

I'm unable to explain this much clearer so if you guys still don't understand, let's just forget the thread.
 
OK, so you are looking for "How do I find the LAST RECORD BY SORT ORDER to default a new record's value"?
Create a TOP 1 query on tblChecking ordered by TransDate, payee, and your credit / debit fields.
DLookup your query using the Payee.

Course if you have changed values in your payee table, this won't work as you are doing a by value lookup.

NOTE: Personally I wouldn't do this. Then again I'd not have separate "Credit" and "Debit" fields, I wouldn't do a by value lookup, nor do I think this will be of benefit. Rather I'd simply make sure the user could see the previous transactions for this payee.
 
The currency value will be different for different payees.
And I do want to add or delete payees from tblPayees.
 
Your request is clearer now. At least we know where the data is coming from but it still makes absolutely no sense. What is the purpose of copying the last entered value into a new record? If the last entry was $10 in the debit column and today you want to enter a $20 debit, why would you start by copying $10 into the new record's debit column?
 
It's not really copying the last entered value, it's the $10 that was entered for "John Doe"
I might have an entry for; say my gas company payment that's $80. Or my electric bill which might be $70...
 

Users who are viewing this thread

Back
Top Bottom