Hi there,
The end product is a VB form that contains a drop-down menu, 3 text boxes and 2 command buttons.
The VB form needs the following:
1 ??" The drop-down menu has to contain/display records from one MS Access database table.
2 ??" When a record is selected retrieve the details from the MS Access table and display in the text boxes.
3 ??" When details have changed save changes back to the MS Access database via a command button.
4 ??" A further command button exits the VB form.
Any feedback very much appreciated…
Kind Regards
Michael
## Deliverables
In summary only the program code in text form is required. See below for sections marked ‘Required:’
Object names are provided below and the code should use and refer to them.
The following is a detailed breakdown of the main 4 items…
1 ??" The drop-down menu has to contain/display records from one MS Access database table.
**Required:
** Code to connect to database, from one table retrieve data from all rows - 2 fields (ID and Name) - and populate drop-down menu ??" ID not shown (hidden) and by Name sorted.
2 ??" When a record is selected retrieve the details from the MS Access table and display in the text boxes.
**Required:
**Code to identify the selected record ID and based on that ID call a routine that retrieves all record details from the MS Access database table ??" which is one further field. Display the retrieved values in the text boxes. The ID is stored in a hidden text box and the Name and Amount are stored in the two other text boxes.
3 ??" When details have changed save changes back to the MS Access database via a command button.
**Required:
**Code for command button to save two of the three values to the MS Access database. Code has to retrieve the original record based on ID in one of the text boxes that is hidden. The values of the other two fields need saving to database.
4 - A further command button exits the VB form.
**Required:
**Code for command button to shut down and exit. Code should properly close connections, workspaces and databases etc ??" if not done already in above routines.
**Object Names:
**Drop-down menu: cboSelectClient
Text box 1: txtClientID ??" hidden
Text box 2: txtClientName
Text box 3: txtAmount
Command button 1: cmdSave
Command button 2: cmdExit
Database name and location: C:\[login to view URL]
Table Name: tblClient
Field 1: ClientID ??" Indexed: Yes (No Duplicates) - Long Integer
Field 2: ClientName ??" Text
Field 3: Amount ??" Currency
## Platform
Development environment: Microsoft Visual Basic .NET (Microsoft Development Environment 2003)
Operating system: Windows 98/Windows 2000 or XP
MS Access version: 97 or later