Moving from tableA to tableB
Posted: Fri Feb 24, 2017 1:36 am
Hello to all, first post so please be gentle!!
I am creating a base project performing a loaning out function. I have 2 main tables, one contacts and one assets. I have created a form and subform on a loan "window". Main form is to select the loan item from the asset table and the subform drives a listbox driven from the contacts table.
What I am trying to do is copy the selected name from the listbox into the loaned to cell against the asset selected. So basically copy a name from contacts to asset.
I have tried various codes but can not seem to reference the listbox to retrieve the name in it.
Anyone any ideas?
Form name = Loan
ListBox = Name
I have created a text box called text to output the name to. Text is linked to the data "loaned to" in the asset table.
I hope that all makes sense!!
Thank you in advanced.
I am creating a base project performing a loaning out function. I have 2 main tables, one contacts and one assets. I have created a form and subform on a loan "window". Main form is to select the loan item from the asset table and the subform drives a listbox driven from the contacts table.
What I am trying to do is copy the selected name from the listbox into the loaned to cell against the asset selected. So basically copy a name from contacts to asset.
I have tried various codes but can not seem to reference the listbox to retrieve the name in it.
Anyone any ideas?
Form name = Loan
ListBox = Name
Code: Select all
oFilter = ThisDatabaseDocument.FormDocuments.getbyname("Loan").open
oFormCtl = oDoc.drawpage.forms.getbyname("Name").value
I hope that all makes sense!!
Thank you in advanced.