Wildcard in variable

M

Midget

I have a line of code...
Dim FolderName As String
FolderName = Me![PR#] & ", " & Me![Serial] & ", " & Me![Name]
That basically is going to open up a folder based on the current
record. For backwards compatibility I need to be able to use a
wildcard instead of a field name, something like:

FolderName = Me![wildcard here] & ", " & Me![Serial] & ", " & Me!
[wildcard here]

Does anyone know the syntax for accomplishing this? I have tried
everything at my disposal with no luck
Thanks in advance!!

Ryan
 
J

John W. Vinson

I have a line of code...
Dim FolderName As String
FolderName = Me![PR#] & ", " & Me![Serial] & ", " & Me![Name]
That basically is going to open up a folder based on the current
record. For backwards compatibility I need to be able to use a
wildcard instead of a field name, something like:

FolderName = Me![wildcard here] & ", " & Me![Serial] & ", " & Me!
[wildcard here]

Does anyone know the syntax for accomplishing this? I have tried
everything at my disposal with no luck
Thanks in advance!!

Ryan

I don't understand the purpose of the wildcard. The syntac Me![wildcard here]
means "whatever is in the form control named 'wildcard here' " - and I doubt
there will be such a control.

What do you want as the ultimate folder name value? What will you do with that
value when you've constructed it?
 
M

Midget

I have a line of code...
Dim FolderName As String
FolderName = Me![PR#] & ", " & Me![Serial] & ", " & Me![Name]
That basically is going to open up a folder based on the current
record.  For backwards compatibility I need to be able to use a
wildcard instead of a field name, something like:
FolderName = Me![wildcard here] & ", " & Me![Serial] & ", " & Me!
[wildcard here]
Does anyone know the syntax for accomplishing this?  I have tried
everything at my disposal with no luck
Thanks in advance!!

I don't understand the purpose of the wildcard. The syntac Me![wildcard here]
means "whatever is in the form control named 'wildcard here' " - and I doubt
there will be such a control.

What do you want as the ultimate folder name value? What will you do withthat
value when you've constructed it?
--

             John W. Vinson [MVP]- Hide quoted text -

- Show quoted text -

John,
Basically I am trying to add some functionality to some really old
data here. We have someone who places orders, when the order is first
placed they know the request date and the part number, so they go
create a folder called for example, 15 Jul 09, LNA550. A few days
later the Purchase request comes in and they append the folder name to
09165001, 15 Jul 09, LNA550. A month later a contract is made for
this item and the folder name is appended yet again.
My goal is to create a button on the form that, when clicked, will go
and search out, say the Purchase Request number, regardless of the
other words in the folder name, and open it. This is a unique number
and only this folder would contain it. So even if the folder is named
CL334-09, 09165001, 15 Jul 09, LNA550, I want this button to be able
to find and open it based only on the 09165001 from this record. Does
that make sense? I used the made up code above to try and explain
this, but I guess writing it out like this serves this purpose
better. Thanks for looking at this John!

Ryan
 

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