repeated records prompt

R

R. Daniel Carlson

I would like an unbound text box to say "Other Records Available" whenever a
donor record is displayed AND there are other gifts in the table from the
same donor/ID number. This is a rare thing, but when it happens I want the
users to know.
 
D

Douglas J. Steele

Assuming the donorID is in a field txtDonorID and the details are stored in
table Donations, try setting the ControlSource property of the unbound text
box to

=IIf(DCount("*", "Donations", "DonorID=" & Forms![NameOfForm]!txtDonorID)>1,
"Other Records Available", Null)
 
R

R. Daniel Carlson

Works for me! Thanks
--
R. Daniel Carlson
Concordia University
Office of Development


Douglas J. Steele said:
Assuming the donorID is in a field txtDonorID and the details are stored in
table Donations, try setting the ControlSource property of the unbound text
box to

=IIf(DCount("*", "Donations", "DonorID=" & Forms![NameOfForm]!txtDonorID)>1,
"Other Records Available", Null)
 
R

R. Daniel Carlson

Actually, it's coming up with #error! on every record. Here's the altered
coded:

=IIf(DCount("*","tbl_donr_calls","REC_DONOR_ID=" &
Forms!frm_call_list!REC_DONOR_ID)>1,"Other Records Available",Null)

I'm going to try it again, as i just noticed the [] weren't around the
frm_call_list - but if you see anything else, please let me know.

--
R. Daniel Carlson
Concordia University
Office of Development


Douglas J. Steele said:
Assuming the donorID is in a field txtDonorID and the details are stored in
table Donations, try setting the ControlSource property of the unbound text
box to

=IIf(DCount("*", "Donations", "DonorID=" & Forms![NameOfForm]!txtDonorID)>1,
"Other Records Available", Null)
 
R

R. Daniel Carlson

I tried to add the brackets to the form name, but it keeps removing them, and
the #error! still shows up on each record.
--
R. Daniel Carlson
Concordia University
Office of Development


R. Daniel Carlson said:
Actually, it's coming up with #error! on every record. Here's the altered
coded:

=IIf(DCount("*","tbl_donr_calls","REC_DONOR_ID=" &
Forms!frm_call_list!REC_DONOR_ID)>1,"Other Records Available",Null)

I'm going to try it again, as i just noticed the [] weren't around the
frm_call_list - but if you see anything else, please let me know.

--
R. Daniel Carlson
Concordia University
Office of Development


Douglas J. Steele said:
Assuming the donorID is in a field txtDonorID and the details are stored in
table Donations, try setting the ControlSource property of the unbound text
box to

=IIf(DCount("*", "Donations", "DonorID=" & Forms![NameOfForm]!txtDonorID)>1,
"Other Records Available", Null)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


R. Daniel Carlson said:
I would like an unbound text box to say "Other Records Available" whenever
a
donor record is displayed AND there are other gifts in the table from the
same donor/ID number. This is a rare thing, but when it happens I want
the
users to know.
 
D

Douglas J. Steele

The square brackets aren't essential in your case: I include them for those
cases where people have embedded spaces in their names (never a good idea!)

Make sure that you didn't mistyped the name of the table, the name of the
field, the name of the form and the name of the control.

Also, try:

=IIf(DCount("*","tbl_donr_calls","REC_DONOR_ID=Forms!frm_call_list!REC_DONOR_ID")>1,"Other
Records Available",Null)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


R. Daniel Carlson said:
Actually, it's coming up with #error! on every record. Here's the altered
coded:

=IIf(DCount("*","tbl_donr_calls","REC_DONOR_ID=" &
Forms!frm_call_list!REC_DONOR_ID)>1,"Other Records Available",Null)

I'm going to try it again, as i just noticed the [] weren't around the
frm_call_list - but if you see anything else, please let me know.

--
R. Daniel Carlson
Concordia University
Office of Development


Douglas J. Steele said:
Assuming the donorID is in a field txtDonorID and the details are stored
in
table Donations, try setting the ControlSource property of the unbound
text
box to

=IIf(DCount("*", "Donations", "DonorID=" &
Forms![NameOfForm]!txtDonorID)>1,
"Other Records Available", Null)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


R. Daniel Carlson said:
I would like an unbound text box to say "Other Records Available"
whenever
a
donor record is displayed AND there are other gifts in the table from
the
same donor/ID number. This is a rare thing, but when it happens I want
the
users to know.
 

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