It does except the 10's come before the 2's
Did I do something wrong?
IIf(Left([tblQuestions.PageCode],7)="General","_" & Format(Mid([tblQuestions.PageCode],9),"0000"),[tblQuestions.PageCode])
Hey that's cool!
The "0000" is the number of characters in the mid statement to return....?
But what is Format? The format of the string? 0001?
This only worked on the General * questions.
Now I have to deal with my A 1, A 10, A 2, B 1, B 10, B 2, etc.
So do I somehow nest Left("A1",7)...
I doubt there would ever be more than 99. But I don't follow you. Were do I put the leading zeros?
add some leading zeroes to the digit part of the calculated field. - I've tried a couple things that didn't work...so I'm wondering where...
IIf(Left([PageCode],7)="General","_" &...
I guess I'm a little anal too...
I've been reading about the "mid" part of the formula. Since my 10's are still before my 2's.
MID
Returns a specific number of characters from a text string starting at the position you specify.
Syntax
MID(text,start_num,num_chars)
Text is the text...
If I ran 45 minutes I'd drop dead, sure glad I have a lazy dog!
I tried your formula and got the following message: The specified field '[PageCode]' could refer to more than one table in the FROM clause of our SQL statement. That qry is build with tblQuestions and tblQuestionsResults. So I...
It's time for me to go, I have a 45 minute commute and a big dog waiting to go outside. Can we pick this back up tomorrow. If I have time I may be able to work on this tonight. not sure.
Oh boy, now you got me lost. Mid, is that the middle of the formula? The 8 has me lost. I haven't gotten anything to work yet with the formula, and I just made it worse.:(
The name of the field that holds General1, A1, etc is called PageCode.
And I apologize, there is no space between General and 1 if that makes a difference.
As you can see from my last post, it takes awhile for things to sink in. I know that from Excel! I guess I'm reaching the age where my...
Okay, that makes sense, but how to do it does not. Your formula:
IIf(Left("[PageCode]",7)="General","_" & Right("[PageCode",1),"[PageCode]")
I don't understand the numbers (7 & 1).
I assumed that "topic" would be the field name that I want to sort. So I changed it to PageCode
What I think...
No, I did not create this query. I've been helped along with this from a coworker who knows a great deal more than I do. I know how to make simple queries but I don't completely understand the concept behind creating a calculated field in a query. I've been reading in the Access Bible, but...
I'm sorry to be so dense...I placed the formula in an empty field in the qryQuestionsSubform query. I changed "topic" to PageCode and the column contains just that. [PageCode]
What did I do wrong?
Not really, I'm still rather new to this and trying to learn. Would I put this formula in the criteria in the query? I'm not sure I know what a calculated column is.
There are 185 lines of information on this form. General 1 through 10 and who knows how many A1-? B1-? C1-?...through the whole alphabet, with the possibility of it continuing. AA1-?BA1-? etc. I want them to show up on the form in this order. Over 10 really throws a wrench in. It comes out...
My data needs to be sorted a little differently. First all topics beginning General 1, General 2, General 3, etc., then A1, A2, A3, B1, B2, B3, C1, C2, C3....
Is there an easy way I can accomplish this?
Thanks, Rhonda