SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Building Expressions


Building Expressions

Author
Message
sasansamani
sasansamani
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 Visits: 66
the character is changed to a number when I send the info to a textbox.

look at my design and my expression
=[Combo0] & "- " & [Combo2] & "" & [Text27] & "- " & [Combo4] & "" & [Combo6] & "- " & [Text25]


How do I need to build this expression?
Attachments
private error.JPG (8 views, 20.00 KB)
sasansamani
sasansamani
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 Visits: 66
maybe I am not explaining this correctly.

HaulerID = 2
Asset =C
Asset Number =6565
Material =A
Classfication =T
Year =2012

Waste Hauler Account Number should be 2-C6565-AT-2012

But the output is 2-26565-11-2012

this is the expression I am using
=[Combo0] & "- " & [Combo2] & "" & [Text27] & "- " & [Combo4] & "" & [Combo6] & "- " & [Text25]
Evil Kraig F
Evil Kraig F
SSCrazy Eights
SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)

Group: General Forum Members
Points: 8583 Visits: 7660
sasansamani (11/29/2012)
maybe I am not explaining this correctly.


I'm afraid I don't have an answer for you but I don't believe the problem is the explanation per se. It's just that most of us aren't MSAccess experts. Might I recommend you try Experts Exchange as well as here?


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
JTSash
JTSash
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1514 Visits: 2026
I suggest you look at the RowSource and BoundColumn properties of each item. My guess is that you have some sot of ID field that is the BoundColumn. This is the value that will be returned when you reference it in the expression.
sasansamani
sasansamani
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 Visits: 66
thank you very much.

I think the problem is related to BoundColumn Property

http://office.microsoft.com/en-us/access-help/boundcolumn-property-HA001232723.aspx


let me see what I can do
ProofOfLife
ProofOfLife
SSC-Enthusiastic
SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)

Group: General Forum Members
Points: 106 Visits: 9474
Hi

Use the cstr function to convert numeric values into text which can then be concatenated into your string. Test for null values and replace them with a valid character or string.

Also make sure that the value you want to retrieve from the combo control is the bound value as you have discovered. If it is not, then you will also need to specify the column number (numbering starts at zero). Therefore [Combo2](1) should retrieve the value from the second column of your control.

Cheers

Rowan
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search