Connecting Tech Pros Worldwide Forums | Help | Site Map

Combining Fields

DS
Guest
 
Posts: n/a
#1: Nov 13 '05
I have a Combo Box (Fiield 2 is the seen one, field 1 is the bound one)
and I want to combine it with another field on a report. The new field
should only be visible whenever the Amount field is greater than 0.
How would I accomplish this?
Thanks
DS

David Schofield
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Combining Fields


On Tue, 14 Dec 2004 10:04:57 -0500, DS <bootybox@optonline.net> wrote:
[color=blue]
>I have a Combo Box (Fiield 2 is the seen one, field 1 is the bound one)
>and I want to combine it with another field on a report. The new field
>should only be visible whenever the Amount field is greater than 0.
>How would I accomplish this?
>Thanks
>DS[/color]
Hi
This is not very clear.
Since a space is invisible, you can set a control to have the
controlsource
=iif([Amount]>0, xxxx, " ")
where xxx is whatever you want to be visible.
David

DS
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Combining Fields


David Schofield wrote:[color=blue]
> On Tue, 14 Dec 2004 10:04:57 -0500, DS <bootybox@optonline.net> wrote:
>
>[color=green]
>>I have a Combo Box (Fiield 2 is the seen one, field 1 is the bound one)
>>and I want to combine it with another field on a report. The new field
>>should only be visible whenever the Amount field is greater than 0.
>>How would I accomplish this?
>>Thanks
>>DS[/color]
>
> Hi
> This is not very clear.
> Since a space is invisible, you can set a control to have the
> controlsource
> =iif([Amount]>0, xxxx, " ")
> where xxx is whatever you want to be visible.
> David
>[/color]
What it is, is this. The first field is a combo box that yields a
percent number, 10%, 15% etc. The second field is a field that says,
Family Discount, Manager Discount, etc. Also a combo box, both boxes
are bound to field 1 and display field 2. What I want to do is a third
field, unbound that would give me the result of field 1 and 2 combined.
Example: Family Discount 10%, Manager Discount 10%, etc. If there
is no percentage Family Discount, Manager Discount etc...there are
several combinations but that shouldn't matter.
Thanks DS
Koontzie
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Combining Fields


How about setting the form's On Current event to something like
ComboBox3 = ComboBox2.Column(1) & " " & ComboBox1.Column(1)

Column counts start at 0 so column 1 is the 2nd column. You can also
include some code to check if either of the ComboBox fields are null
before populating ComboBox3.

Hope this helps ... Good luck!!

DS
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Combining Fields


Koontzie wrote:
[color=blue]
> How about setting the form's On Current event to something like
> ComboBox3 = ComboBox2.Column(1) & " " & ComboBox1.Column(1)
>
> Column counts start at 0 so column 1 is the 2nd column. You can also
> include some code to check if either of the ComboBox fields are null
> before populating ComboBox3.
>
> Hope this helps ... Good luck!!
>[/color]
GOT IT!
Its Format([Discount P],"##%")

Thank You Once Again
DS
David Schofield
Guest
 
Posts: n/a
#6: Nov 13 '05

re: Combining Fields


On 15 Dec 2004 11:56:07 -0800, "Koontzie" <creffner@shbm.com> wrote:
[color=blue]
>How about setting the form's On Current event to something like
>ComboBox3 = ComboBox2.Column(1) & " " & ComboBox1.Column(1)
>
>Column counts start at 0 so column 1 is the 2nd column. You can also
>include some code to check if either of the ComboBox fields are null
>before populating ComboBox3.
>
>Hope this helps ... Good luck!!
>[/color]
Is this on a form or a report? On a form you would need to also put
this code in the afterupdate event of each of the combo boxes
David

Bas Cost Budde
Guest
 
Posts: n/a
#7: Nov 13 '05

re: Combining Fields


David Schofield wrote:
[color=blue]
> Is this on a form or a report? On a form you would need to also put
> this code in the afterupdate event of each of the combo boxes
> David[/color]

That draws my attention: if you want all controls on a form to share
certain behavior, you can see the WithEvents article on my site.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Closed Thread


Similar Microsoft Access / VBA bytes