Hi guys
I have a form with the name "frmMainMenu". In this form i have a listbox with the name "LstUsers", and a button with the name "edit".
The listbox contains the records from a table named "tblUsers". In this table I have the following fields:
"Name"
"Last name"
"User name"
When I click the button a subform named "frmEditUsers" is opened.
I do this with the command:
DoCmd.OpenForm "frmEditUsers"
The subform has the following textfields:
"txtName"
"txtLastName"
"txtUserName"
What I want:
If the user marks a record, with the mouse, from the listbox "LstUsers" and presses the "Edit" button the subform "frmEditUsers" shall open and the data from the selected record shall be shown in the the textfields shall be shown respecively as follows:
Name -> "txtName"
Last name -> "txtLastName"
User name -> "txtUserName"
The user can now edit the text in the textfields, and then when he presses another button, the data in the table "tblUser" shall be updated and the updated data shall be shown in the listbox "tblListbox"
How can I do that?
Thanks for you time
I have a form with the name "frmMainMenu". In this form i have a listbox with the name "LstUsers", and a button with the name "edit".
The listbox contains the records from a table named "tblUsers". In this table I have the following fields:
"Name"
"Last name"
"User name"
When I click the button a subform named "frmEditUsers" is opened.
I do this with the command:
DoCmd.OpenForm "frmEditUsers"
The subform has the following textfields:
"txtName"
"txtLastName"
"txtUserName"
What I want:
If the user marks a record, with the mouse, from the listbox "LstUsers" and presses the "Edit" button the subform "frmEditUsers" shall open and the data from the selected record shall be shown in the the textfields shall be shown respecively as follows:
Name -> "txtName"
Last name -> "txtLastName"
User name -> "txtUserName"
The user can now edit the text in the textfields, and then when he presses another button, the data in the table "tblUser" shall be updated and the updated data shall be shown in the listbox "tblListbox"
How can I do that?
Thanks for you time