Synchronising forms

  • Thread starter Thread starter naron
  • Start date Start date
N

naron

Hi - I am building a DB from ms-access I have a simple GUI form to start
with that allows basic data to be added for each unit built and buttons to
bring up a separate comments field where comments are added by the
technician. However when in practice the comments field opens ok and
comments can be entered but they save to a new record.

How can I synchronise it so when the comments form is opened it adds data to
the same record the basic data entry form is recording?

I know it can be done - the help file tells me it can - It just doesnt tell
me how to do it!

Appreciate any help.

Cheers

Mark
 
Use a Where clause to open the second form:

DoCmd.OpenForm "SecondFormName",,,"ID =" & Me.txtID

if there is no matching record, it will then open a blank new one. Use the
DefaultValue property of the second form to read the ID from the first one
for new records:

=[Forms]![FirstFormName]![txtID]
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
I dont claim to be good with access so dont trust me 100% but i think i know how to do this.
Create a new table that is just the ID and comments. Then create a 1-1 relationship between the IDs.
Create another form for the new table.
On the origional form put on your button (using wizard for ease) to open the new form but instead of showing all records, "show specific data". Select the 2 IDs for each table then click the middle button.
Try the button now and write in the new comments box.
sorry if its not what you meant.
 
Mark,

If two forms have the identical recordset they will stay in sync regardless
of how you navigate between records.

There are many ways to get this to happen.

One way that sounds like it might meet your needs is, if the forms named
'comments' is always opened while the form named 'details' is already open,
you might give the comments form an event proc of:

Private Sub Form_Load()
Set Me.Recordset = Form_details.Recordset
End Sub
 
Back
Top