Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Building Expressions Expand / Collapse
Author
Message
Posted Thursday, November 29, 2012 12:20 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, January 11, 2013 11:52 AM
Points: 28, Visits: 50
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?



  Post Attachments 
private error.JPG (5 views, 20.82 KB)
Post #1390311
Posted Thursday, November 29, 2012 11:45 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, January 11, 2013 11:52 AM
Points: 28, Visits: 50
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]
Post #1390748
Posted Thursday, November 29, 2012 11:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Saturday, October 18, 2014 4:43 AM
Points: 5,401, Visits: 7,512
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
Post #1390756
Posted Thursday, November 29, 2012 12:17 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, October 17, 2014 6:31 AM
Points: 1,281, Visits: 1,691
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.
Post #1390768
Posted Thursday, November 29, 2012 4:19 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, January 11, 2013 11:52 AM
Points: 28, Visits: 50
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
Post #1390906
Posted Thursday, November 29, 2012 5:01 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 21, 2014 4:34 PM
Points: 48, Visits: 9,470
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
Post #1390917
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse