Okay, I went there, but I don't understand what this has to do with the
textbox giving me the error "#Name?". I am new at this so please break
it
down for me. I will go over what I have done so far with you again:
I have two tables established. One holds the contact info for the
members
and the other is just for the membership types and fees..
Table: Members
Fields: MemberID - numeric primary key (autonumber), Organization Name,
Street Address, Phone, etc. etc.
Table: Membership Types and Fees
Fields: MembershipID - numeric primary key (autonumber), Membership
Type,
Membership Fees (three fields only)
These two tables are not linked in any way. I want to create a form to
have
the information come together. Specifically, my problem is that I want
the
form to have a combo box to choose "Membership Type" and then have the
"Membership Fees" automatically inserted into the text box next to it
in
currency format. I want this selection to be specific to each record in
the
form and I also would eventually like to have this information
available
to
do a Mail Merge in Microsoft Word.
:
Amy,
No I don't mean References... my fault, please press the Code button
and
go
to Tools... References in the Module code window behind a form or
report.
Doesn't matter which one they are the same no matter which one you
select.
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
I have already checked the names of the fields and tables and all is
as
it
should be. When you say References, do you mean Relationships?
References
is
not an option under Tools while I am in design of my form. When I go
to
relationships, there is nothing there.
Is there another way to do this?
:
Amy,
Perhaps check references... go to design of any form or report and
under
Tools... References... and resolve any that are MISSING. If none
are
missing, check to confirm the names of all fiedls and tables in the
DLookUp
function.
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
Okay, I looked and I actually had it named "Fees".
Is there any other reason why this doesn't work?
:
Amy,
When you get a chance to look at it, you can't name the text box
any
name
that is included in the function. Please name it
txtMembershipFees.
--
Gina Whipp
"I feel I have been denied critical, need to know,
information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
I named the text box Membership Fees, I think. I am at home now
so
I
can't
rember exactly. What should I look for when I get back?
:
What sis you name the text box?
--
Gina Whipp
"I feel I have been denied critical, need to know,
information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
message
Hi Gina, it did not work I get "#Name?" in the box instead
of
the
price.
:
Amy,
Yes, it should go in the Control Source, could be I forgot
to
type
that.
And the DLookUp I provided should work, post back if it
doesn't!
--
Gina Whipp
"I feel I have been denied critical, need to know,
information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
message
Hi Gina, thank you for your response.
Yes, I do have the spaces in there. I did not realize
that
it
can
cause
issues, but thanks for letting me know.
Membership Types and Fees is the table
MembershipID is a numeric field and is also the primary
key
Membership Type is the second column in this table
Membership Fees is the third, not Currency. I just had
the
format
for
that
field set to Currency so that it would display dollars
instead
of
plain
numbers.
Where would I put the DLookUp statement? I am assuming
in
the
Control
Source
field in the properties of the text box I created called
"Membership
Fee",
but I am not positive.
:
Amy,
Just to be sure you typed in the Membership Types and
Fees
with
those
spaces
in it? Also you missed a few fields...
Table: Membership Types and Fees
MembershipID - Is this a numeric field?
Membership Type
Membership Currency - Or does it have another name?
Your combo box needs to be two columns MembershipID and
Membership
Type,
The first column can be hidden to all you see is
Membership
Type.
Potentially, you could use the below in an unbound text
box
as
long
as
the
fields are as stated above...
Textbox name: txtMembershipFee
=DLookup("[Membership Currency]", "[Membership Types
and
Fees]",
"[MembershipID]=" & Me![Membership Type])
On another note, putting spaces in your Object and
Field
names
causes
you
to
have to bracket anything with a space. I try to avoid
the
extra
key
strokes
by eliminating spaces in the befroe mentioned items.
--
Gina Whipp
"I feel I have been denied critical, need to know,
information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
message
Hi Gina! Okay, here is the info:
Table: Membership Types and Fees
ComboBox Name: Membership Type
Key: MembershipID
Thank you for your help!!
:
Amy,
Assuming you have a table with Membership Type and
Membership
Fee
on
your
form you could use the wizard to create your combo
box.
After
you
create
your combo box you could have an unbound text field
to
capture
the
Membership Fee, using a DLookUp. If you need help