Discussion Locked

Access Copying field informaton

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi Everyone,
I am trying to figure out how to give one form the ability to copy text information in certain fields to another form.
I have a form where a quote gets entered for a customer and then I want to set up a way for certain information to be copied through to the sale form to remove the need to re-enter data. I would appreciate any help that I can get from the vast expertise within this discussion group.

4 replies

by deepsand

This is a tech. problem, in search of a solution.

It properly belongs in "Technical Q&A," not in "Discussions." Please re-post there.

Not only will you be more likely to attract the attention of those seeking to provide answers, but you will also make it easier for those seeking discussions to find such.

Thank you.

by the_mayors

r u still interested in finding how to do this or have you figured it out?
can you understand vba (access's visual basic programming language

by vohalloran

Create global string variables in a module in VBA. You can populate the variables using an event such as textbox_exit. Then you can put the values of these variables in the sale form when it opens.

Example:
'You create global variables in a module:
Public strUserID as String
Public strCardNum as String

'Then when an event occurs (in this case a button is clicked), put the user id in a string
strUserID = CStr(txtUserID.Value) 'CStr converts the value to a string
'put the card number in a string
strCardNum = CStr(txtCardNum.Value)

'When the new form opens reverse the process except you don't need to convert again

txtUserID.text = strUserID
txtCardNum.text = strCardNum

This discussion is closed to new replies.