J
justme
I have a memo field named "CommentRaw". Examples of memo data:
EXAMPLE1
Can keep strobel construction. But o/s filler change to EVA diecut, last
has minor revision on lateral toe area to improve fit. Need remake sample.
-- Sample Date: 12/29/2006--Basic Status: Rejected
EXAMPLE2
Change construction to be board lasted. Need to remake basic fit sample. --
Sample Date: 12/29/2006--Extreme Status: Rejected
EXAMPLE3
Fit on Jack, ok. -- Sample Date: 12/29/2006--Basic Status: Approved
The CommentsRaw field always ends with
"-- Sample Date" nn/nn/nnnn--Basic Status: nnnnnnnn" or
"-- Sample Date" nn/nn/nnnn--Extreme Status: nnnnnnnn", where n is variable.
I am trying to extract the sample date to a new field named "SampleDate" in
an update query. I have "SampleDate" updating to:
IIf([CommentRaw] Like "*-- Sample Date: ##/##/####--Basic Status:
*",CDate(Mid([CommentRaw],InStr([CommentRaw],"-- Sample Date:
")+17,InStr([CommentRaw],"--Basic Status:")-InStr([CommentRaw],"-- Sample
Date: ")-17)),IIf([CommentRaw] Like "*-- Sample Date: ##/##/####--Extreme
Status: *",CDate(Mid([CommentRaw],InStr([CommentRaw],"-- Sample Date:
")+17,InStr([CommentRaw],"--Extreme Status: ")-InStr([CommentRaw],"-- Sample
Date: ")-17)),Null))
All works fine if date is single-digit month. Those with double-digit
months are not updated. Can you see why?
thanks so much.
EXAMPLE1
Can keep strobel construction. But o/s filler change to EVA diecut, last
has minor revision on lateral toe area to improve fit. Need remake sample.
-- Sample Date: 12/29/2006--Basic Status: Rejected
EXAMPLE2
Change construction to be board lasted. Need to remake basic fit sample. --
Sample Date: 12/29/2006--Extreme Status: Rejected
EXAMPLE3
Fit on Jack, ok. -- Sample Date: 12/29/2006--Basic Status: Approved
The CommentsRaw field always ends with
"-- Sample Date" nn/nn/nnnn--Basic Status: nnnnnnnn" or
"-- Sample Date" nn/nn/nnnn--Extreme Status: nnnnnnnn", where n is variable.
I am trying to extract the sample date to a new field named "SampleDate" in
an update query. I have "SampleDate" updating to:
IIf([CommentRaw] Like "*-- Sample Date: ##/##/####--Basic Status:
*",CDate(Mid([CommentRaw],InStr([CommentRaw],"-- Sample Date:
")+17,InStr([CommentRaw],"--Basic Status:")-InStr([CommentRaw],"-- Sample
Date: ")-17)),IIf([CommentRaw] Like "*-- Sample Date: ##/##/####--Extreme
Status: *",CDate(Mid([CommentRaw],InStr([CommentRaw],"-- Sample Date:
")+17,InStr([CommentRaw],"--Extreme Status: ")-InStr([CommentRaw],"-- Sample
Date: ")-17)),Null))
All works fine if date is single-digit month. Those with double-digit
months are not updated. Can you see why?
thanks so much.