By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

OpenForm only opens record with data if form has been opened before

P: n/a
SDL
stLinkCriteria = "CUSTOMER_ID = " & CUSTOMER_ID
stDocName = "NEW INVOICE"
DoCmd.OpenForm stDocName, , , stLinkCriteria

"NEW INVOICE" opens with TONUMBER) in key field and no other data

If I leave it open and go back to the other form and click the ID again
it fills in with the data.
I just redid this whole screen because I couldn't get my other approach
to work and this worked (or seemed to at first). Once I get it up the
first time everything is fine and the sub form works too. Any
suggestions?

Jul 15 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
SDL wrote:
stLinkCriteria = "CUSTOMER_ID = " & CUSTOMER_ID
stDocName = "NEW INVOICE"
DoCmd.OpenForm stDocName, , , stLinkCriteria

"NEW INVOICE" opens with TONUMBER) in key field and no other data

If I leave it open and go back to the other form and click the ID again
it fills in with the data.
I just redid this whole screen because I couldn't get my other approach
to work and this worked (or seemed to at first). Once I get it up the
first time everything is fine and the sub form works too. Any
suggestions?
Do you have any code in the OnOpen or OnLoad events that would change
the recordsource? Anything in the recordsource that would limit it to a
specific customer?
Jul 15 '06 #2

P: n/a
SDL
I don't have anything in those areas at the moment, but I did add a
line just to stop it there and the data that should be passed is absent
on this first pass. If I hit a record again on that previous screen and
it appears as I said when I try it again.

salad wrote:
SDL wrote:
stLinkCriteria = "CUSTOMER_ID = " & CUSTOMER_ID
stDocName = "NEW INVOICE"
DoCmd.OpenForm stDocName, , , stLinkCriteria

"NEW INVOICE" opens with TONUMBER) in key field and no other data

If I leave it open and go back to the other form and click the ID again
it fills in with the data.
I just redid this whole screen because I couldn't get my other approach
to work and this worked (or seemed to at first). Once I get it up the
first time everything is fine and the sub form works too. Any
suggestions?
Do you have any code in the OnOpen or OnLoad events that would change
the recordsource? Anything in the recordsource that would limit it to a
specific customer?
Jul 15 '06 #3

P: n/a
SDL
I found out that it was the Cycle being set to Current_Record. It is
kind of a bummer as I didn't want them scrolling thru customers on this
screen, but perhaps I can find another way around that.

SDL wrote:
I don't have anything in those areas at the moment, but I did add a
line just to stop it there and the data that should be passed is absent
on this first pass. If I hit a record again on that previous screen and
it appears as I said when I try it again.

salad wrote:
SDL wrote:
stLinkCriteria = "CUSTOMER_ID = " & CUSTOMER_ID
stDocName = "NEW INVOICE"
DoCmd.OpenForm stDocName, , , stLinkCriteria
>
"NEW INVOICE" opens with TONUMBER) in key field and no other data
>
If I leave it open and go back to the other form and click the ID again
it fills in with the data.
I just redid this whole screen because I couldn't get my other approach
to work and this worked (or seemed to at first). Once I get it up the
first time everything is fine and the sub form works too. Any
suggestions?
>
Do you have any code in the OnOpen or OnLoad events that would change
the recordsource? Anything in the recordsource that would limit it to a
specific customer?
Jul 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.