How to design this form editor record scenerio?

  • Thread starter Thread starter Cheng-Liang Shen
  • Start date Start date
C

Cheng-Liang Shen

Hi All

I would like design a Main Form listing all the records in the table, then
then I can select one of the record and
hit Edit button to open another Edit Form to modify each record field with
the data lock protection. Then hit the
Save button to close the Edit Form and go back to Main Form. Could anyone
give me the direction how this could
be done in Microsoft Access? Appreciate the help.
 
Cheng-Liang Shen said:
I would like design a Main Form listing all the records in the table, then
then I can select one of the record and
hit Edit button to open another Edit Form to modify each record field with
the data lock protection. Then hit the
Save button to close the Edit Form and go back to Main Form..

Start with a query that will return all the records from the table, sorted
the way you want to see them in a form. Build a continuous form based upon
that query. Set the form to read only, by turning off Additions, Deletions,
and Edits. Using the record selectors, and/or the double-click event of the
controls on the form, open a second form with some code which links the ID
of the underlying records to the name of the ID control in the first form.
Something like:

DoCmd.OpenForm "FormName",,,"ID = " & Me.txtID
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Hi

Thanks for the input which is really helpful. If in my Main Form I would
like to list the records
in the brief mode which means only list some fields of the records and have
all the records showing
in the form together. I don't know which Microsoft Access Control object can
help me do this and
how this control can be used to open the second Edit Form throught the
LinkCriteria.

If you know something about this, please let me know that. Appreciate the
help.
 
A control is a form object (textbox, button, etc.) so your code might look
like this:

Private Sub txtID_DblClick(Cancel As Integer)
DoCmd.OpenForm "FormName",,,"ID = " & Me.txtID
End Sub

Where txtID is a text box holding the ID value of the record.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top