Copy multiple data from Cbobox to Textbox

JPR

Registered User.
Local time
Yesterday, 23:25
Joined
Jan 23, 2009
Messages
232
Hello,
I have a form with a combo and a textbox.
The combo has its records source to a table named documents. The text box is unbound.
I was wondering if if would be possible to copy different records (not at the same time) from the combo box and place them in new lines in the text box. Something like this:

ID
Passport
Driving License

Thank you
 
the query behind the combo box should have 3 columns
the combo property: column count= 3, either hide them or show them. (via columnwidths)
then in the AFTERUPDATE of the combo, fill the text boxes.

Note: in VB, columns begin with zero

Code:
sub cboBox_Afterupdate()
txtID = cboBox.column(0)
txtPasspt = cboBox.column(1)
txtDriverLic = cboBox.column(2)

end sub
 
Hello,
as recommended, I have created a new table. Unfortunately I am now having a problem when adding a New Record to my DB. This only happens the first time, when there are no other records in the db.
I am sharing a test copy of my database. It is used to keep track of document we receive from clients and that need to be returned to them via courier.

Once you open the file, click on New Case and a form will open that will allow users to add a new case. When you click on the button Save/Close, you will notice that the list box on the Main Menu has two records.
By double clicking on a records, it will open the same form for any updates.
I would really appreciate your help as I do not know how to fix this problem.
Thank you.
 

Attachments

Hello Pat.
First le me thank you for your help.
I have removed the DOC fields in the LOG table but am confused on what control rename txtinputfile.

I have tried to add your codes to my sample, removed the unbound listbbox and replace it with a subform which has its records source to the DOCS table but just cannot get it to work (probabaly a bit too advanced for my knowledge).
 

Users who are viewing this thread

Back
Top Bottom