Connecting Tech Pros Worldwide Help | Site Map

Combining Fields

  #1  
Old November 13th, 2005, 06:20 AM
DS
Guest
 
Posts: n/a
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
  #2  
Old November 13th, 2005, 06:21 AM
David Schofield
Guest
 
Posts: n/a

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

  #3  
Old November 13th, 2005, 06:23 AM
DS
Guest
 
Posts: n/a

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
  #4  
Old November 13th, 2005, 06:23 AM
Koontzie
Guest
 
Posts: n/a

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!!

  #5  
Old November 13th, 2005, 06:23 AM
DS
Guest
 
Posts: n/a

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
  #6  
Old November 13th, 2005, 06:23 AM
David Schofield
Guest
 
Posts: n/a

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

  #7  
Old November 13th, 2005, 06:24 AM
Bas Cost Budde
Guest
 
Posts: n/a

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 Threads
Thread Thread Starter Forum Replies Last Post
Combining Fields to string rpeacock answers 2 June 27th, 2007 02:36 AM
Combining fields kkjensen answers 1 April 25th, 2007 08:13 PM
Need help combining fields cajun answers 2 September 4th, 2006 12:43 AM
Combining fields in a table Scott answers 1 November 13th, 2005 05:18 AM