Inserting data in forms

D

Dudley

I am trying to create a command button in a form which inserts standard data
in other forms. I can open another form with:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "DirectorSubForm"

stLinkCriteria = "[EnvelopeNumber]=" & Me![EnvelopeNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria

But if I then try to insert data with Me.Forename= "DUDLEY", Access does not
find Forename, only controls in the original form.

Thanks for any help.
Dudley
 
D

Dudley

Thanks for your help.
Dudley

bhicks11 via AccessMonster.com said:
Use:

forms!formname.forename instead of me.forename

(replace with your formname of course)

Bonnie
http://www.dataplus-svc.com
I am trying to create a command button in a form which inserts standard data
in other forms. I can open another form with:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "DirectorSubForm"

stLinkCriteria = "[EnvelopeNumber]=" & Me![EnvelopeNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria

But if I then try to insert data with Me.Forename= "DUDLEY", Access does not
find Forename, only controls in the original form.

Thanks for any help.
Dudley
 

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

Similar Threads

Copying from two forms 10
Puzzling error with DoCmd.Close 2
Vista problem? 5
Criteria when opening form 1
If Statements 2
cannot filter continuous form data 2
need an acDialog clarification 1
stLinkCriteria 3

Top