Add two values in a table from a drop down

  • Thread starter Thread starter peashoe
  • Start date Start date
P

peashoe

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.
 
Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian said:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
Hi Lisa,

Yes, that's exactly what I am saying. If you are giving them a list of
items to choose from, you generally want to store the ID of the item they
selected, not the data. There are of course exceptions to this rule, but
we'll leave it at that for now.

To then get the fields you require to calculate things, you would have your
query link the Attendees table to the Packages table, and select the fields
as appropriate from each table.

Alternatively, you can have the selected package display in a combo, and
have the rate display in a non-editable text box by using
"=forms!frmFORMNAME.cboCOMBONAME.column(2)" as the text boxes data source -
assuming that you had ID, Package Type and Rate as the fields (in order)
returned in the query for your packages combo box.

Does this make sense?

Damian.

Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian said:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
Damian,
Ok I changed the combo box so that it displays the name of the package
on the form but it adds the ID in the Attendees table. Now, I need to
create a query that will populate in a txtTotalPackage field.

Do I create a query then use DLookup in the control source of the text
field?

ps- sorry, I'm still learning

~L~


Damian said:
Hi Lisa,

Yes, that's exactly what I am saying. If you are giving them a list of
items to choose from, you generally want to store the ID of the item they
selected, not the data. There are of course exceptions to this rule, but
we'll leave it at that for now.

To then get the fields you require to calculate things, you would have your
query link the Attendees table to the Packages table, and select the fields
as appropriate from each table.

Alternatively, you can have the selected package display in a combo, and
have the rate display in a non-editable text box by using
"=forms!frmFORMNAME.cboCOMBONAME.column(2)" as the text boxes data source -
assuming that you had ID, Package Type and Rate as the fields (in order)
returned in the query for your packages combo box.

Does this make sense?

Damian.

Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian said:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

:

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
Hi again Lisa,

Great that you have the combo attaching the ID to your Attendees table...

Now what are you trying to do? If you are trying to display the total of
the selected packages (ie: for all attendees) you could use several different
methods, one way would be to have a query that calculates the total of all
selected packages and you could use dlookup in the txtTotalPackage control
source to retrieve that value, similar to this:

=dlookup ("[TotalAmount]", "qryCalculateTotalAmount", CRITERIA)

where CRITERIA is the way you would group them, eg: by Tour Group etc...

How do you like that?

D.




Damian,
Ok I changed the combo box so that it displays the name of the package
on the form but it adds the ID in the Attendees table. Now, I need to
create a query that will populate in a txtTotalPackage field.

Do I create a query then use DLookup in the control source of the text
field?

ps- sorry, I'm still learning

~L~


Damian said:
Hi Lisa,

Yes, that's exactly what I am saying. If you are giving them a list of
items to choose from, you generally want to store the ID of the item they
selected, not the data. There are of course exceptions to this rule, but
we'll leave it at that for now.

To then get the fields you require to calculate things, you would have your
query link the Attendees table to the Packages table, and select the fields
as appropriate from each table.

Alternatively, you can have the selected package display in a combo, and
have the rate display in a non-editable text box by using
"=forms!frmFORMNAME.cboCOMBONAME.column(2)" as the text boxes data source -
assuming that you had ID, Package Type and Rate as the fields (in order)
returned in the query for your packages combo box.

Does this make sense?

Damian.

Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian S wrote:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

:

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
D,
ok I created a query called Package_Price:
SELECT Sum(Packages.[Extra Room Price]*Attendees.[Extended Days]) AS
SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package
Code]=Packages.[Package Code]
WHERE ((Registrations.[School Or
Organization])=Forms!Registrations![School Or Organization]);

I ran it and it gave me the right amount.

Now I used the following in the textbox Control Source:
=DLookUp("[SumOfPrice]","Package_Price","[School Or Organization
ID]=Forms!Registrations!txtID")

where txtID is a textbox that displays the school ID

but I get #Error

~L~



Damian said:
Hi again Lisa,

Great that you have the combo attaching the ID to your Attendees table...

Now what are you trying to do? If you are trying to display the total of
the selected packages (ie: for all attendees) you could use several different
methods, one way would be to have a query that calculates the total of all
selected packages and you could use dlookup in the txtTotalPackage control
source to retrieve that value, similar to this:

=dlookup ("[TotalAmount]", "qryCalculateTotalAmount", CRITERIA)

where CRITERIA is the way you would group them, eg: by Tour Group etc...

How do you like that?

D.




Damian,
Ok I changed the combo box so that it displays the name of the package
on the form but it adds the ID in the Attendees table. Now, I need to
create a query that will populate in a txtTotalPackage field.

Do I create a query then use DLookup in the control source of the text
field?

ps- sorry, I'm still learning

~L~


Damian said:
Hi Lisa,

Yes, that's exactly what I am saying. If you are giving them a list of
items to choose from, you generally want to store the ID of the item they
selected, not the data. There are of course exceptions to this rule, but
we'll leave it at that for now.

To then get the fields you require to calculate things, you would have your
query link the Attendees table to the Packages table, and select the fields
as appropriate from each table.

Alternatively, you can have the selected package display in a combo, and
have the rate display in a non-editable text box by using
"=forms!frmFORMNAME.cboCOMBONAME.column(2)" as the text boxes data source -
assuming that you had ID, Package Type and Rate as the fields (in order)
returned in the query for your packages combo box.

Does this make sense?

Damian.

:

Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian S wrote:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

:

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
Hi Lisa,

You have called your field SumOfPlus in the query, but SumOfPrice in the
dlookup.

Also, your criteria has quotes in the wrong place, it should be:

"[School Or Organization ID]= " & Forms!Registrations!txtID

Nearly there!

D.

D,
ok I created a query called Package_Price:
SELECT Sum(Packages.[Extra Room Price]*Attendees.[Extended Days]) AS
SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package
Code]=Packages.[Package Code]
WHERE ((Registrations.[School Or
Organization])=Forms!Registrations![School Or Organization]);

I ran it and it gave me the right amount.

Now I used the following in the textbox Control Source:
=DLookUp("[SumOfPrice]","Package_Price","[School Or Organization
ID]=Forms!Registrations!txtID")

where txtID is a textbox that displays the school ID

but I get #Error

~L~



Damian said:
Hi again Lisa,

Great that you have the combo attaching the ID to your Attendees table...

Now what are you trying to do? If you are trying to display the total of
the selected packages (ie: for all attendees) you could use several different
methods, one way would be to have a query that calculates the total of all
selected packages and you could use dlookup in the txtTotalPackage control
source to retrieve that value, similar to this:

=dlookup ("[TotalAmount]", "qryCalculateTotalAmount", CRITERIA)

where CRITERIA is the way you would group them, eg: by Tour Group etc...

How do you like that?

D.




Damian,
Ok I changed the combo box so that it displays the name of the package
on the form but it adds the ID in the Attendees table. Now, I need to
create a query that will populate in a txtTotalPackage field.

Do I create a query then use DLookup in the control source of the text
field?

ps- sorry, I'm still learning

~L~


Damian S wrote:
Hi Lisa,

Yes, that's exactly what I am saying. If you are giving them a list of
items to choose from, you generally want to store the ID of the item they
selected, not the data. There are of course exceptions to this rule, but
we'll leave it at that for now.

To then get the fields you require to calculate things, you would have your
query link the Attendees table to the Packages table, and select the fields
as appropriate from each table.

Alternatively, you can have the selected package display in a combo, and
have the rate display in a non-editable text box by using
"=forms!frmFORMNAME.cboCOMBONAME.column(2)" as the text boxes data source -
assuming that you had ID, Package Type and Rate as the fields (in order)
returned in the query for your packages combo box.

Does this make sense?

Damian.

:

Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian S wrote:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

:

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
D,
Ok I got it - thank you soooo much!
=DLookUp("[SumOfPrice]","Package_Price","Registrations.[School Or
Organization] = [Forms]![Registrations]![School Or Organization]")

I have one last question. I have the same situation for a checkbox
field in the same attendees table called [Plus Price]. I tried:

SELECT Sum(Packages.[Plus Price]) AS SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package
Code]=Packages.[Package Code]
WHERE (((Registrations.[School Or
Organization])=Forms!Registrations![School Or Organization]) AND
Attendees.[Plus Package]=1);

the value should be $30 but nothing happens... any idea about where the
syntax is wrong? My boolean on the attendees table is set to yes/no

~L~



D,
ok I created a query called Package_Price:
SELECT Sum(Packages.[Extra Room Price]*Attendees.[Extended Days]) AS
SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package
Code]=Packages.[Package Code]
WHERE ((Registrations.[School Or
Organization])=Forms!Registrations![School Or Organization]);

I ran it and it gave me the right amount.

Now I used the following in the textbox Control Source:
=DLookUp("[SumOfPrice]","Package_Price","[School Or Organization
ID]=Forms!Registrations!txtID")

where txtID is a textbox that displays the school ID

but I get #Error

~L~



Damian said:
Hi again Lisa,

Great that you have the combo attaching the ID to your Attendees table...

Now what are you trying to do? If you are trying to display the total of
the selected packages (ie: for all attendees) you could use several different
methods, one way would be to have a query that calculates the total of all
selected packages and you could use dlookup in the txtTotalPackage control
source to retrieve that value, similar to this:

=dlookup ("[TotalAmount]", "qryCalculateTotalAmount", CRITERIA)

where CRITERIA is the way you would group them, eg: by Tour Group etc...

How do you like that?

D.




Damian,
Ok I changed the combo box so that it displays the name of the package
on the form but it adds the ID in the Attendees table. Now, I need to
create a query that will populate in a txtTotalPackage field.

Do I create a query then use DLookup in the control source of the text
field?

ps- sorry, I'm still learning

~L~


Damian S wrote:
Hi Lisa,

Yes, that's exactly what I am saying. If you are giving them a list of
items to choose from, you generally want to store the ID of the item they
selected, not the data. There are of course exceptions to this rule, but
we'll leave it at that for now.

To then get the fields you require to calculate things, you would have your
query link the Attendees table to the Packages table, and select the fields
as appropriate from each table.

Alternatively, you can have the selected package display in a combo, and
have the rate display in a non-editable text box by using
"=forms!frmFORMNAME.cboCOMBONAME.column(2)" as the text boxes data source -
assuming that you had ID, Package Type and Rate as the fields (in order)
returned in the query for your packages combo box.

Does this make sense?

Damian.

:

Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian S wrote:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

:

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
D,
No the DLookup is working - This is a seperate query that I am trying
to run before I do the DLookup for this one but it won't work. I'm
thinking it's because I'm doing something wrong with the boolean?

This is the query that will not work:
SELECT Sum(Packages.[Plus Price]) AS SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package Code] =
Packages.[Package Code]
WHERE ((([Registrations].[School Or
Organization])=[Forms]![Registrations]![School Or Organization]) AND
((Attendees.[Plus Package])=1));

I have a Plus Package check box (set as yes/no in the table) in the
attendees table - and I need to sum(plus price) for current record
where attendees.Plus Package is YES

~L~
 
Hi again Lisa,

You are referencing a table that isn't in your select list - the
Registrations table. If you want to use it in your where clause, you will
need to have the table in the select list (ie: joined to another table, even
if you aren't selecting any fields from it).

D.

D,
Ok I got it - thank you soooo much!
=DLookUp("[SumOfPrice]","Package_Price","Registrations.[School Or
Organization] = [Forms]![Registrations]![School Or Organization]")

I have one last question. I have the same situation for a checkbox
field in the same attendees table called [Plus Price]. I tried:

SELECT Sum(Packages.[Plus Price]) AS SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package
Code]=Packages.[Package Code]
WHERE (((Registrations.[School Or
Organization])=Forms!Registrations![School Or Organization]) AND
Attendees.[Plus Package]=1);

the value should be $30 but nothing happens... any idea about where the
syntax is wrong? My boolean on the attendees table is set to yes/no

~L~



D,
ok I created a query called Package_Price:
SELECT Sum(Packages.[Extra Room Price]*Attendees.[Extended Days]) AS
SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package
Code]=Packages.[Package Code]
WHERE ((Registrations.[School Or
Organization])=Forms!Registrations![School Or Organization]);

I ran it and it gave me the right amount.

Now I used the following in the textbox Control Source:
=DLookUp("[SumOfPrice]","Package_Price","[School Or Organization
ID]=Forms!Registrations!txtID")

where txtID is a textbox that displays the school ID

but I get #Error

~L~



Damian said:
Hi again Lisa,

Great that you have the combo attaching the ID to your Attendees table...

Now what are you trying to do? If you are trying to display the total of
the selected packages (ie: for all attendees) you could use several different
methods, one way would be to have a query that calculates the total of all
selected packages and you could use dlookup in the txtTotalPackage control
source to retrieve that value, similar to this:

=dlookup ("[TotalAmount]", "qryCalculateTotalAmount", CRITERIA)

where CRITERIA is the way you would group them, eg: by Tour Group etc...

How do you like that?

D.




:

Damian,
Ok I changed the combo box so that it displays the name of the package
on the form but it adds the ID in the Attendees table. Now, I need to
create a query that will populate in a txtTotalPackage field.

Do I create a query then use DLookup in the control source of the text
field?

ps- sorry, I'm still learning

~L~


Damian S wrote:
Hi Lisa,

Yes, that's exactly what I am saying. If you are giving them a list of
items to choose from, you generally want to store the ID of the item they
selected, not the data. There are of course exceptions to this rule, but
we'll leave it at that for now.

To then get the fields you require to calculate things, you would have your
query link the Attendees table to the Packages table, and select the fields
as appropriate from each table.

Alternatively, you can have the selected package display in a combo, and
have the rate display in a non-editable text box by using
"=forms!frmFORMNAME.cboCOMBONAME.column(2)" as the text boxes data source -
assuming that you had ID, Package Type and Rate as the fields (in order)
returned in the query for your packages combo box.

Does this make sense?

Damian.

:

Damian,
I'm trying to figure out the best way to do this:
The attendee table (subform) needs to display the following values
name, package, rate, arrival date, departure date, etc

most values are entered manually, but the packages they pick in the
drop down will determine what rate they will get. I need both values to
populate seperately in the subform as well as have the value to create
an invoice later.

so if I link Package ID to the Attendees table, then are you saying
that when they choose a package, the ID will go in the attendees table,
then have some kind of query in the package and rate field in the
attendees control source or change event that will show the values?

~L~

Damian S wrote:
Hi Lisa,

Why do you want to add the items from the combo to another table? You could
simply have the Attendees table link to the Packages table via the ID field...

Other than that, if you are wanting to display two fields in a Combo after
you have selected it, you will need to create a display field that
concatenates the two fields together, eg: DisplayField: [Display] & " : " &
[Rate] would achieve that for you.

If you are meaning something entirely different, feel free to clarify.

Hope this helps.

Damian.

:

I have a drop down called packages (which pulls from a Packages Table)
ID
Display - this is what they see on the left of the dropdown
Rate - this is what they see on the right

The drop down needs to add 'Display' and 'Rate' in another table called
Attendees (which is a subform). How do I get this to work? I can have
it either populate the Display or the Rate fields in Attendees but I
can't figure out both.

any ideas?
Thanks in advance

Lisa
 
Hi Lisa,

True is -1 in Access... not 1. Attendees.[Plus Package])=1

Try Attendees.[Plus Package])= -1
or even Attendees.[Plus Package])=True

D.
 
D,
I see what you are saying but all the queries are exactly the same
except for this one which has an AND clause. I guess my question is:
How do I referrence a yes/no checkbox in a query? Attendees.[CheckBox]
= 1 doesn't seem to work?

Make sense?
~L~
 
yep that worked THANK YOU!

~L~


Damian said:
Hi Lisa,

True is -1 in Access... not 1. Attendees.[Plus Package])=1

Try Attendees.[Plus Package])= -1
or even Attendees.[Plus Package])=True

D.

D,
No the DLookup is working - This is a seperate query that I am trying
to run before I do the DLookup for this one but it won't work. I'm
thinking it's because I'm doing something wrong with the boolean?

This is the query that will not work:
SELECT Sum(Packages.[Plus Price]) AS SumOfPlus
FROM Attendees INNER JOIN Packages ON Attendees.[Package Code] =
Packages.[Package Code]
WHERE ((([Registrations].[School Or
Organization])=[Forms]![Registrations]![School Or Organization]) AND
((Attendees.[Plus Package])=1));

I have a Plus Package check box (set as yes/no in the table) in the
attendees table - and I need to sum(plus price) for current record
where attendees.Plus Package is YES

~L~
 
I posted this before:

Hi Lisa,

True is -1 in Access... not 1. Attendees.[Plus Package])=1

Try Attendees.[Plus Package])= -1
or even Attendees.[Plus Package])=True

D.
 
Back
Top