|
-
Jun 26th, 2003, 05:44 PM
#1
Thread Starter
Frenzied Member
VB code to append query
ok heres what i'm stumped on:
I have a field called WorkOrderNo which contains either PM followed by digits, or some other letters followed by digits. I have another field called WorkOrderType which needs to be set to 2 if its a PM or 1 if its not a PM.
This has to be done in an append query expression, so I tried to do it, but it just doesn't work, I'm very new to append queries.
here is the code that I put together:
VB Code:
if ((left ( WorkOrderNo, 2 )) = "PM") then WorkOrderType = "2"
if ((left ( WorkOrderNo, 2 )) <> "PM") then WorkOrderType = "1"
Thank you in advance
-Dimava
NXSupport - Your one-stop source for computer help
-
Jun 27th, 2003, 02:57 AM
#2
Do a
VB Code:
Msgbox Left(workorderno,2)
What do you get?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|