Engr. Matthew
New member
- Local time
- Today, 03:11
- Joined
- Feb 27, 2021
- Messages
- 9
I have a particular form that contains a unique number, let say card number I want to use as a search parameter on a form.
I have Textbox for example txtCardno. and a command button to retrieve the patient information. On each form there is a command button that opens the same Form, which use listbox to display patient records.
I placed this code on a double click (Forms![formname]!txtPhone = Me.lstboxname.Column(4)) I use this line of code to retrive card noumber when double click on a selected patinet record on the form. the form closes and the card number of the patient displayed on the txtCardno on the main form, clicking search button retrieve the patient's record. It works fine. however, this solution required me to have different copy of the form to each of the forms I want to use the form which is much. what really want is to have only one sigle form to be open in each form and let the form post data using generic code that use varants object to accomplish the task
Now, how can I modify the duoble click code of the form to a generic code to retrive the name of the form opened from and pass the data to the form control without have many copies of the form for each form I want use the form.
I have Textbox for example txtCardno. and a command button to retrieve the patient information. On each form there is a command button that opens the same Form, which use listbox to display patient records.
I placed this code on a double click (Forms![formname]!txtPhone = Me.lstboxname.Column(4)) I use this line of code to retrive card noumber when double click on a selected patinet record on the form. the form closes and the card number of the patient displayed on the txtCardno on the main form, clicking search button retrieve the patient's record. It works fine. however, this solution required me to have different copy of the form to each of the forms I want to use the form which is much. what really want is to have only one sigle form to be open in each form and let the form post data using generic code that use varants object to accomplish the task
Now, how can I modify the duoble click code of the form to a generic code to retrive the name of the form opened from and pass the data to the form control without have many copies of the form for each form I want use the form.