memo field - manipulating data

N

needInfo25

I have a memo field from which I would like to extract a date. Sample text is:

sent on 02032007 from US

I want to create a parameter query, the date entered by the user should be
used to filter the records. In other words, that date should be used to match
against the date used in the manipulation above.
 
F

fredg

I have a memo field from which I would like to extract a date. Sample text is:

sent on 02032007 from US

I want to create a parameter query, the date entered by the user should be
used to filter the records. In other words, that date should be used to match
against the date used in the manipulation above.

As criteria on the Memo field, write:
Like "*" & [What are you looking for?] & "*"
When prompted, enter 02032007

Note; That may mean a date to you, but to Access it's just text.
 
N

needInfo25

Thanks, but that's what I had and the results include the wrong dates. For
example, if I enter 11302007, some of the results will have 5112007 (May 11th)
 
G

Guest

Do you want to pull all records that have that date OR pull all dates all the
records?

For records matching the date use this as criteria --
Like "*" & "02032007" & "*"

If all have 'sent on' preceeding the date then use this.
Mid([YourMemo],InStr([YourMemo],"sent on")+8,8)
 
G

Guest

Memo fields are quite large (lots of data) so is it possible you have both of
those dates in the same memo field?
--
KARL DEWEY
Build a little - Test a little


needInfo25 said:
Thanks, but that's what I had and the results include the wrong dates. For
example, if I enter 11302007, some of the results will have 5112007 (May 11th)
.

Isn't there a function I can use? I trield Val() but that didn't work.
I have a memo field from which I would like to extract a date. Sample text is:
[quoted text clipped - 3 lines]
used to filter the records. In other words, that date should be used to match
against the date used in the manipulation above.

As criteria on the Memo field, write:
Like "*" & [What are you looking for?] & "*"
When prompted, enter 02032007

Note; That may mean a date to you, but to Access it's just text.
 
N

needInfo25 via AccessMonster.com

I want to pull all records that have that date.

I used the Mid() function as in your example but get a ODBC Failed error
(although I'm connected to the Network, etc. just fine).

Thanks for your help!

KARL said:
Do you want to pull all records that have that date OR pull all dates all the
records?

For records matching the date use this as criteria --
Like "*" & "02032007" & "*"

If all have 'sent on' preceeding the date then use this.
Mid([YourMemo],InStr([YourMemo],"sent on")+8,8)
I have a memo field from which I would like to extract a date. Sample text is:
[quoted text clipped - 3 lines]
used to filter the records. In other words, that date should be used to match
against the date used in the manipulation above.
 
N

needInfo25 via AccessMonster.com

Also, I had it originially set up with the 'Like "*" & "02032007" & "*"',
however is there a way to permit the user to pull all records for the month
of February. I tried 02**2007, but that pulls any record with 02 in it.

KARL said:
Do you want to pull all records that have that date OR pull all dates all the
records?

For records matching the date use this as criteria --
Like "*" & "02032007" & "*"

If all have 'sent on' preceeding the date then use this.
Mid([YourMemo],InStr([YourMemo],"sent on")+8,8)
I have a memo field from which I would like to extract a date. Sample text is:
[quoted text clipped - 3 lines]
used to filter the records. In other words, that date should be used to match
against the date used in the manipulation above.
 
G

Guest

Use 'Like "*" & "02??2007" & "*"',
Question mark is for single character wild card.
--
KARL DEWEY
Build a little - Test a little


needInfo25 via AccessMonster.com said:
Also, I had it originially set up with the 'Like "*" & "02032007" & "*"',
however is there a way to permit the user to pull all records for the month
of February. I tried 02**2007, but that pulls any record with 02 in it.

KARL said:
Do you want to pull all records that have that date OR pull all dates all the
records?

For records matching the date use this as criteria --
Like "*" & "02032007" & "*"

If all have 'sent on' preceeding the date then use this.
Mid([YourMemo],InStr([YourMemo],"sent on")+8,8)
I have a memo field from which I would like to extract a date. Sample text is:
[quoted text clipped - 3 lines]
used to filter the records. In other words, that date should be used to match
against the date used in the manipulation above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top