Copying field value to another form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings!

I have a form where a user would enter usage information about an account.
The account must first be listed in the Account tables before it can be
entered in the Usage table. In the Usage table I currently have a drop down
box of all known account numbers. What I want to do is when a user enters an
acccount number that is not in the drop down list (not in list property) I
want Access to copy the number they entered, then open up a data entry
Account form, and paste the value in the Account form. The user will then
enter the rest of the information pertaining to the account and close the
form. On the form's closing, the Usage form is brought back and I want that
account number to now be available in the drop down list.

So far I have figured out how to open the blank Account form, and how to
requery the drop down box so that the new account number is in it, but what I
don't know how to do is to pass the account number from the Usage form to the
Account form without having the user retype the number. Any suggestions
thoughts or ideas?

Thanks!
 
in the Usage form's OnAfterUpdate event handler code you could write
something to add an list item to Forms!frmAccount.accountList (as long as the
frmAccount was already open). (same as building a form's list control in
code in the
first place, just "build" as new list item later).
 
Maybe I wasn't clear...my combo box is in the Usage form, and I want to take
the value from there and add it to the Accounts form, where I will need enter
additional information. So it is a matter of first taking the value and
copying it to the Accounts form, and then getting the combo box in the Usage
form to requery the Accounts table for the value. I am also toying with the
idea of just using a text box in the Usage form, but it is still linked in a
relationship with the Accounts table, so before any usage with a new account
is entered it must first be entered in the accounts table....but I don't want
the user having to close the Usage form and open the Accounts form to add
each new account (new accounts can occur at any time, and there will be no
way of knowing if an account is new or not before entering it).

But thank you for the input.

Jessica
 
Back
Top