Retrieve, Save and Update Data

SBBmaster09

Registered User.
Local time
Today, 18:23
Joined
Apr 26, 2013
Messages
92
Hi i am such a newbie with MS Access 2007. I am trying to make a form and there are few questions I would like to ask.

Form2

Text0 = Textfield for ID
Text2 = Textfield for LName
Text3 = Textfield for FName

btnRet = Button for retrieve when ID is entered in Text0
btnUpdate = Button for saving the changes made in the textfields.


How can I search the ID from the Table I made? And when it was matched, get the details of that ID unto the designated text fields. It was like retrieving the data from the table with the ID typed in the text field from the form I made.

Then when it was retrieved, I can edit the fields and when I hit the Update button, the edited fields will replaced the original data.

Also after it was updated, a new record will be added in the history table that the ID was edited. Is is possible?

For now, i want to know how to retrieve the data with the ID and edit and save it after and update the table. Does it applies with the codes with the retrieve button and update button?

Hope I can learn from this forum. Sorry for I am very new here. Thanks.
 
Welcome to AWF.

You would normally use a form bound to the table you want to update and the controls would be each be bound to a field. Once you have set that up, then you can use the control wizard to add a combo box to select an existing record and it will go to that record (it is option 3 but that is only available for bound forms).

And by bound form, the form's RECORD SOURCE property would have a table/query name, or a SQL Select statement.

And by bound control, the control's COUNTROL SOURCE property would have in it the name of a field in the form's record source.
 
Here's a step-by-step for utilizing Option 3 in the Combobox Wizard:

If you haven't already done so, create a Form based on your Table or Query, including all the Fields you want displayed.

Then simply:
  • Add a Combobox to your Form.
  • The Combobox Wizard will pop up
  • Select "Find a record based on the value I selected in my combobox."
  • From the Table or Query the Form is based on, click on the Field you're searching by (a Field that is unique for each Record, ideally your ID Field) to move it to the right side.
  • Hit Next.
  • Size the column appropriately.
  • Hit Next.
  • Name the Combobox something appropriate.
  • Hit Finish.
Now you can drop the Combobox down and scroll down to the item to search by, or you can start to enter the item, and the Combobox will "autofill" as you type. Hit <Enter> and the Record will be retrieved.

The webpage Bob gave you a link to, FunctionX.com, is an excellent, well organized site for learning the basics of Access, and then some, and you really owe it to yourself to take the time to work through it, as Bob suggested! His site also has many useful hacks, and is well worth the time it takes to review them!

Linq ;0)>
 
Sorry for the late reply, it works. I've learned a lot in your suggestions and answers. Thanks a lot. ;)
 

Users who are viewing this thread

Back
Top Bottom