Link pop up form data with main form data


N

NDClark

I have a main form with a block of data that cannot be edited. This is what
I want to happen. I have the block of data when Dbl clicked it will open a
smaller pop up form with the data block in it. This can be edited.

The problem is even if I change my record on the main form and Dbl click the
data block the smaller pop up opens only to the first record. I want to be
able to open the smaller pop up to edit the data I am currently on.

Thanks for any help.
 
Ad

Advertisements

J

Jeanette Cunningham

Have a way to uniquely identify the block of data you want.
Very often this is the primary key of the containing the block of data.
It can be a different field, as long as it has unique values.

To open the popup form use this type of thing

DoCmd.OpenForm "[NameOfPopup]", , , "[PKey] = " & Me.PKeyID, , acDialog

If the primary key is a text field use quotes like this

DoCmd.OpenForm "[NameOfPopup]", , , "[PKey] = """ & Me.PKeyID & """"

Copy and paste this into notepad to see the quotes clearly.

Note: replace [NameOfPopup] with your form's name.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

Jeanette Cunningham

I see a single word was missing in that last post.

This: Very often this is the primary key of the ............containing the
block of data.

To this: Very often this is the primary key of the *record* containing the
block of data.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



Jeanette Cunningham said:
Have a way to uniquely identify the block of data you want.
Very often this is the primary key of the containing the block of data.
It can be a different field, as long as it has unique values.

To open the popup form use this type of thing

DoCmd.OpenForm "[NameOfPopup]", , , "[PKey] = " & Me.PKeyID, , acDialog

If the primary key is a text field use quotes like this

DoCmd.OpenForm "[NameOfPopup]", , , "[PKey] = """ & Me.PKeyID & """"

Copy and paste this into notepad to see the quotes clearly.

Note: replace [NameOfPopup] with your form's name.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

NDClark said:
I have a main form with a block of data that cannot be edited. This is
what
I want to happen. I have the block of data when Dbl clicked it will open
a
smaller pop up form with the data block in it. This can be edited.

The problem is even if I change my record on the main form and Dbl click
the
data block the smaller pop up opens only to the first record. I want to
be
able to open the smaller pop up to edit the data I am currently on.

Thanks for any help.
 
Ad

Advertisements

N

NDClark

Thanks Jeanette!

Jeanette Cunningham said:
I see a single word was missing in that last post.

This: Very often this is the primary key of the ............containing the
block of data.

To this: Very often this is the primary key of the *record* containing the
block of data.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



Jeanette Cunningham said:
Have a way to uniquely identify the block of data you want.
Very often this is the primary key of the containing the block of data.
It can be a different field, as long as it has unique values.

To open the popup form use this type of thing

DoCmd.OpenForm "[NameOfPopup]", , , "[PKey] = " & Me.PKeyID, , acDialog

If the primary key is a text field use quotes like this

DoCmd.OpenForm "[NameOfPopup]", , , "[PKey] = """ & Me.PKeyID & """"

Copy and paste this into notepad to see the quotes clearly.

Note: replace [NameOfPopup] with your form's name.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

NDClark said:
I have a main form with a block of data that cannot be edited. This is
what
I want to happen. I have the block of data when Dbl clicked it will open
a
smaller pop up form with the data block in it. This can be edited.

The problem is even if I change my record on the main form and Dbl click
the
data block the smaller pop up opens only to the first record. I want to
be
able to open the smaller pop up to edit the data I am currently on.

Thanks for any help.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top