Field on separate form

G

Guest

I have a form with a button which, when clicked, opens a separate form with
just a field for memos for that record.....however, i can't get the field to
link to just one record. It's like theres only one memo record and lots of
other records. The memo field is the same table and the same query so I
don't understand why this is happening. It's never happened before!
 
A

Arvin Meyer [MVP]

If the memo field is in the same table, you are likely to lock yourself out
of using it by having it on a separate form or subform. If you want the same
table, use a tab control with the memo field's control on a different tab.

If you want a separate form, use a second table with the ID field matching
the first, and the memo field. A form based upon that table can be opened
with:

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

and the DefaultValue of the ID field in the memo form should be set to:

=[Forms]![YourFormName]![txtID]

Of course substituting your own names.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

I have this code set to the OnClick thing of a button that says...Enter Memo

DoCmd.OpenForm "frmMemo", acNormal, , "CRD =" & Me.pkCRDNumber

And this in the field on the Memo form for the CRD (id number)

=[Forms]![frmFirst]![pkCRDNumber]

Any glaring errors?

I set up a second table with just the pkCRDNumber and Memo field and linked
them one to one in the relationships layout.


Arvin Meyer said:
If the memo field is in the same table, you are likely to lock yourself out
of using it by having it on a separate form or subform. If you want the same
table, use a tab control with the memo field's control on a different tab.

If you want a separate form, use a second table with the ID field matching
the first, and the memo field. A form based upon that table can be opened
with:

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

and the DefaultValue of the ID field in the memo form should be set to:

=[Forms]![YourFormName]![txtID]

Of course substituting your own names.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

albycindy said:
I have a form with a button which, when clicked, opens a separate form with
just a field for memos for that record.....however, i can't get the field to
link to just one record. It's like theres only one memo record and lots of
other records. The memo field is the same table and the same query so I
don't understand why this is happening. It's never happened before!
 

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