WHERE problem

  • Thread starter Thread starter David#
  • Start date Start date
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!!
 
-----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 ()
 
-----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 ()
 
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]
 
Back
Top