WHERE problem

D

David#

My form "frmAccounts" hold my Acct.s# and Acct Names for
past due acct's. My "frmCallnotes" holds my collection
attempt data linked to Acct# for each Acct.

I want to click on my "Account Name" and open the
CallNotes form showing ALL calls for that account PLUS an
blank,new record field. I'm getting blank record for NEW
record enrty but no existing records. The Navigation
Buttons show "Record 1 of 1", so all existing record are
filtered out. What am I missing!!

Private Sub AcctName_Click()
DoCmd.RunCommand
acCmdSaveRecord DoCmd.OpenForm "frmCallNotes",
acNormal, "", "[Forms]![frmCallNotes]![AcctID]=[Forms]!
[frmAccounts]![AcctID]", "", acNormal

Thanks!!
 
L

Larry

-----Original Message-----
My form "frmAccounts" hold my Acct.s# and Acct Names for
past due acct's. My "frmCallnotes" holds my collection
attempt data linked to Acct# for each Acct.

I want to click on my "Account Name" and open the
CallNotes form showing ALL calls for that account PLUS an
blank,new record field. I'm getting blank record for NEW
record enrty but no existing records. The Navigation
Buttons show "Record 1 of 1", so all existing record are
filtered out. What am I missing!!

Private Sub AcctName_Click()
DoCmd.RunCommand
acCmdSaveRecord DoCmd.OpenForm "frmCallNotes",
acNormal, "", "[Forms]![frmCallNotes]![AcctID]=[Forms]!
[frmAccounts]![AcctID]", "", acNormal

Thanks!!



.Try this
before the (acNormal,"")
add (acNormal,"","",acEdit)
without the ()
 
L

Larry

-----Original Message-----
My form "frmAccounts" hold my Acct.s# and Acct Names for
past due acct's. My "frmCallnotes" holds my collection
attempt data linked to Acct# for each Acct.

I want to click on my "Account Name" and open the
CallNotes form showing ALL calls for that account PLUS an
blank,new record field. I'm getting blank record for NEW
record enrty but no existing records. The Navigation
Buttons show "Record 1 of 1", so all existing record are
filtered out. What am I missing!!

Private Sub AcctName_Click()
DoCmd.RunCommand
acCmdSaveRecord DoCmd.OpenForm "frmCallNotes",
acNormal, "", "[Forms]![frmCallNotes]![AcctID]=[Forms]!
[frmAccounts]![AcctID]", "", acNormal

Thanks!!



.Try this
before the (acNormal,"")
add (acNormal,"","",acEdit)
without the ()
 
J

John Vinson

DoCmd.OpenForm "frmCallNotes",
acNormal, "", "[Forms]![frmCallNotes]![AcctID]=[Forms]!
[frmAccounts]![AcctID]", "", acNormal

The criterion is incorrect on three grounds. First you're comparing
the values of FORM CONTROLS - the criterion should reference a TABLE
FIELD instead. Secondly, you've got the criterion
(Forms!frmAccounts!AcctID) inside the quotes. Finally you're putting
some extra acNormal parameters in there.

Try

DoCmd.OpenForm "frmCallNotes", WhereCondition:="[AcctID]=" &
[Forms]![frmAccounts]![AcctID]
 

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