OpenArgs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the OpenArgs function to pass data from one form to another. The
fields that I'm passing the data to and from are both text fields. Why is it
that if the field that I'm passing from has a " mark in it then it won't pass
that field's data? Is there a way to fix this so it will allow the data to be
passed even if there is a " in the data?
 
Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] & Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) & Me![RMA] &
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't pass the
argument.
 
Whenever you use a particular character (such as ") as a delimiter in SQL
and that character appears in the text, you need to double up the character.
However, you have the option of using a single quote (Chr(39)) rather than a
double quote (Chr(34)):

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(39) & Me![RMA]
& Chr(39), , , Me![RMA]

If CustPO can also have single quotes in it in addition to double quotes,
you'll have no choice but to go the double-up route. Assuming you're using
Access 2000 or newer:

DoCmd.OpenForm "frmCorrectiveAction", , , _
"[RMA#] = " & Chr(34) & _
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & _
Chr(34), , , Me![RMA]

You might take a look at my May, 2004 "Access Answers" column in Pinnacle
Publication's "Smart Access" where I talk about this. You can download the
column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] & Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) & Me![RMA]
&
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't pass the
argument.



Douglas J. Steele said:
How are you passing the data? Show us the code... <g>
 
Secret Squirrel said:
Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] & Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) & Me![RMA] &
Chr(34), , , Me![RMA]

Just to add to Doug's reply, don't bother with the Chr(34). To my
knowledge the OpenArgs doesn't need that extra care and attention that
much of VBA code does need.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Hi Tony,

So should I just replace the Chr(34) with " marks? If so, do I just double
them up to allow the data to be passed through with either single or double
quotation marks in it?

Tony Toews said:
Secret Squirrel said:
Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] & Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) & Me![RMA] &
Chr(34), , , Me![RMA]

Just to add to Doug's reply, don't bother with the Chr(34). To my
knowledge the OpenArgs doesn't need that extra care and attention that
much of VBA code does need.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Hi Doug,

I followed your instructions in your last post and it's working for single
quotes but not for double quotes. Here's what I changed it to:

DoCmd.OpenForm "frmCorrectiveActionRMA", , , "[RMA#] = " & Chr(34) &
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & Chr(34), , , Me![RMA]

Am I doing something else wrong?

Should I also change the code on the line that has the [CustPO] argument?

Douglas J. Steele said:
Whenever you use a particular character (such as ") as a delimiter in SQL
and that character appears in the text, you need to double up the character.
However, you have the option of using a single quote (Chr(39)) rather than a
double quote (Chr(34)):

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(39) & Me![RMA]
& Chr(39), , , Me![RMA]

If CustPO can also have single quotes in it in addition to double quotes,
you'll have no choice but to go the double-up route. Assuming you're using
Access 2000 or newer:

DoCmd.OpenForm "frmCorrectiveAction", , , _
"[RMA#] = " & Chr(34) & _
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & _
Chr(34), , , Me![RMA]

You might take a look at my May, 2004 "Access Answers" column in Pinnacle
Publication's "Smart Access" where I talk about this. You can download the
column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] & Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) & Me![RMA]
&
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't pass the
argument.



Douglas J. Steele said:
How are you passing the data? Show us the code... <g>

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message I'm using the OpenArgs function to pass data from one form to another.
The
fields that I'm passing the data to and from are both text fields. Why
is
it
that if the field that I'm passing from has a " mark in it then it
won't
pass
that field's data? Is there a way to fix this so it will allow the data
to
be
passed even if there is a " in the data?
 
That should work. However, it sounds as though you have a workaround by
using single quotes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
Hi Doug,

I followed your instructions in your last post and it's working for single
quotes but not for double quotes. Here's what I changed it to:

DoCmd.OpenForm "frmCorrectiveActionRMA", , , "[RMA#] = " & Chr(34) &
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & Chr(34), , , Me![RMA]

Am I doing something else wrong?

Should I also change the code on the line that has the [CustPO] argument?

Douglas J. Steele said:
Whenever you use a particular character (such as ") as a delimiter in SQL
and that character appears in the text, you need to double up the
character.
However, you have the option of using a single quote (Chr(39)) rather
than a
double quote (Chr(34)):

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(39) &
Me![RMA]
& Chr(39), , , Me![RMA]

If CustPO can also have single quotes in it in addition to double quotes,
you'll have no choice but to go the double-up route. Assuming you're
using
Access 2000 or newer:

DoCmd.OpenForm "frmCorrectiveAction", , , _
"[RMA#] = " & Chr(34) & _
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & _
Chr(34), , , Me![RMA]

You might take a look at my May, 2004 "Access Answers" column in Pinnacle
Publication's "Smart Access" where I talk about this. You can download
the
column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] &
Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) &
Me![RMA]
&
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't pass
the
argument.



:

How are you passing the data? Show us the code... <g>

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message I'm using the OpenArgs function to pass data from one form to
another.
The
fields that I'm passing the data to and from are both text fields.
Why
is
it
that if the field that I'm passing from has a " mark in it then it
won't
pass
that field's data? Is there a way to fix this so it will allow the
data
to
be
passed even if there is a " in the data?
 
It's only passing through data that has a single quote in it. If I put double
quotes in the data then it won't pass the data. How should I do this now?
Should I double them up again or try something different? Also, should I be
putting these double quotes on the line of code that specifies the [CustPO]
open argument?

Douglas J. Steele said:
That should work. However, it sounds as though you have a workaround by
using single quotes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
Hi Doug,

I followed your instructions in your last post and it's working for single
quotes but not for double quotes. Here's what I changed it to:

DoCmd.OpenForm "frmCorrectiveActionRMA", , , "[RMA#] = " & Chr(34) &
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & Chr(34), , , Me![RMA]

Am I doing something else wrong?

Should I also change the code on the line that has the [CustPO] argument?

Douglas J. Steele said:
Whenever you use a particular character (such as ") as a delimiter in SQL
and that character appears in the text, you need to double up the
character.
However, you have the option of using a single quote (Chr(39)) rather
than a
double quote (Chr(34)):

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(39) &
Me![RMA]
& Chr(39), , , Me![RMA]

If CustPO can also have single quotes in it in addition to double quotes,
you'll have no choice but to go the double-up route. Assuming you're
using
Access 2000 or newer:

DoCmd.OpenForm "frmCorrectiveAction", , , _
"[RMA#] = " & Chr(34) & _
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & _
Chr(34), , , Me![RMA]

You might take a look at my May, 2004 "Access Answers" column in Pinnacle
Publication's "Smart Access" where I talk about this. You can download
the
column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] &
Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) &
Me![RMA]
&
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't pass
the
argument.



:

How are you passing the data? Show us the code... <g>

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message I'm using the OpenArgs function to pass data from one form to
another.
The
fields that I'm passing the data to and from are both text fields.
Why
is
it
that if the field that I'm passing from has a " mark in it then it
won't
pass
that field's data? Is there a way to fix this so it will allow the
data
to
be
passed even if there is a " in the data?
 
Okay, what's not working?

You're passing the same value in the Where condition as in the OpenArgs. Is
the Where condition working?

You definitely need to do the same Replace in setting the default value:

Me![RMA#].DefaultValue = Chr(34) & Replace(Me.OpenArgs, Chr(34), Chr(34) &
Chr(34)) & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & Replace([Forms]![frmRMA]![CustPO],
Chr(34), Chr(34) & Chr(34)) & Chr(34)

Is there some reason why you're passing one value through OpenArgs, but not
the other?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
It's only passing through data that has a single quote in it. If I put
double
quotes in the data then it won't pass the data. How should I do this now?
Should I double them up again or try something different? Also, should I
be
putting these double quotes on the line of code that specifies the
[CustPO]
open argument?

Douglas J. Steele said:
That should work. However, it sounds as though you have a workaround by
using single quotes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
Hi Doug,

I followed your instructions in your last post and it's working for
single
quotes but not for double quotes. Here's what I changed it to:

DoCmd.OpenForm "frmCorrectiveActionRMA", , , "[RMA#] = " & Chr(34) &
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & Chr(34), , , Me![RMA]

Am I doing something else wrong?

Should I also change the code on the line that has the [CustPO]
argument?

:

Whenever you use a particular character (such as ") as a delimiter in
SQL
and that character appears in the text, you need to double up the
character.
However, you have the option of using a single quote (Chr(39)) rather
than a
double quote (Chr(34)):

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(39) &
Me![RMA]
& Chr(39), , , Me![RMA]

If CustPO can also have single quotes in it in addition to double
quotes,
you'll have no choice but to go the double-up route. Assuming you're
using
Access 2000 or newer:

DoCmd.OpenForm "frmCorrectiveAction", , , _
"[RMA#] = " & Chr(34) & _
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & _
Chr(34), , , Me![RMA]

You might take a look at my May, 2004 "Access Answers" column in
Pinnacle
Publication's "Smart Access" where I talk about this. You can download
the
column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] &
Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) &
Me![RMA]
&
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't pass
the
argument.



:

How are you passing the data? Show us the code... <g>

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message I'm using the OpenArgs function to pass data from one form to
another.
The
fields that I'm passing the data to and from are both text
fields.
Why
is
it
that if the field that I'm passing from has a " mark in it then
it
won't
pass
that field's data? Is there a way to fix this so it will allow
the
data
to
be
passed even if there is a " in the data?
 
It's working now. I didn't put the extra quote marks on the line where the
[CustPO] was. The reason I'm passing one and not the other is because the RMA
is being passed when the command button is pushed on Form1. The [CustPO] is
being pulled from the open event on Form2. I had someone on this board help
me create this code and that's how they had me set it up. Should I be running
both of these from the openargs action from Form1 or will it work the way I
have it set up?
What does the "Replace" do in the code? I didn't have it there before and it
worked fine except for the passing of the quote marks.

Douglas J. Steele said:
Okay, what's not working?

You're passing the same value in the Where condition as in the OpenArgs. Is
the Where condition working?

You definitely need to do the same Replace in setting the default value:

Me![RMA#].DefaultValue = Chr(34) & Replace(Me.OpenArgs, Chr(34), Chr(34) &
Chr(34)) & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & Replace([Forms]![frmRMA]![CustPO],
Chr(34), Chr(34) & Chr(34)) & Chr(34)

Is there some reason why you're passing one value through OpenArgs, but not
the other?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
It's only passing through data that has a single quote in it. If I put
double
quotes in the data then it won't pass the data. How should I do this now?
Should I double them up again or try something different? Also, should I
be
putting these double quotes on the line of code that specifies the
[CustPO]
open argument?

Douglas J. Steele said:
That should work. However, it sounds as though you have a workaround by
using single quotes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message Hi Doug,

I followed your instructions in your last post and it's working for
single
quotes but not for double quotes. Here's what I changed it to:

DoCmd.OpenForm "frmCorrectiveActionRMA", , , "[RMA#] = " & Chr(34) &
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & Chr(34), , , Me![RMA]

Am I doing something else wrong?

Should I also change the code on the line that has the [CustPO]
argument?

:

Whenever you use a particular character (such as ") as a delimiter in
SQL
and that character appears in the text, you need to double up the
character.
However, you have the option of using a single quote (Chr(39)) rather
than a
double quote (Chr(34)):

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(39) &
Me![RMA]
& Chr(39), , , Me![RMA]

If CustPO can also have single quotes in it in addition to double
quotes,
you'll have no choice but to go the double-up route. Assuming you're
using
Access 2000 or newer:

DoCmd.OpenForm "frmCorrectiveAction", , , _
"[RMA#] = " & Chr(34) & _
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & _
Chr(34), , , Me![RMA]

You might take a look at my May, 2004 "Access Answers" column in
Pinnacle
Publication's "Smart Access" where I talk about this. You can download
the
column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] &
Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) &
Me![RMA]
&
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't pass
the
argument.



:

How are you passing the data? Show us the code... <g>

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message I'm using the OpenArgs function to pass data from one form to
another.
The
fields that I'm passing the data to and from are both text
fields.
Why
is
it
that if the field that I'm passing from has a " mark in it then
it
won't
pass
that field's data? Is there a way to fix this so it will allow
the
data
to
be
passed even if there is a " in the data?
 
Replace "returns a string in which a specified substring has been replaced
with another substring".

What that particular use of Replace does is take a string, and substitute
two double quotes ("") for each occurrence of a double quote (") in the
original string. In other words, it will change

12"$#

to

12""$#

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
It's working now. I didn't put the extra quote marks on the line where the
[CustPO] was. The reason I'm passing one and not the other is because the
RMA
is being passed when the command button is pushed on Form1. The [CustPO]
is
being pulled from the open event on Form2. I had someone on this board
help
me create this code and that's how they had me set it up. Should I be
running
both of these from the openargs action from Form1 or will it work the way
I
have it set up?
What does the "Replace" do in the code? I didn't have it there before and
it
worked fine except for the passing of the quote marks.

Douglas J. Steele said:
Okay, what's not working?

You're passing the same value in the Where condition as in the OpenArgs.
Is
the Where condition working?

You definitely need to do the same Replace in setting the default value:

Me![RMA#].DefaultValue = Chr(34) & Replace(Me.OpenArgs, Chr(34), Chr(34)
&
Chr(34)) & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & Replace([Forms]![frmRMA]![CustPO],
Chr(34), Chr(34) & Chr(34)) & Chr(34)

Is there some reason why you're passing one value through OpenArgs, but
not
the other?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Secret Squirrel said:
It's only passing through data that has a single quote in it. If I put
double
quotes in the data then it won't pass the data. How should I do this
now?
Should I double them up again or try something different? Also, should
I
be
putting these double quotes on the line of code that specifies the
[CustPO]
open argument?

:

That should work. However, it sounds as though you have a workaround
by
using single quotes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message Hi Doug,

I followed your instructions in your last post and it's working for
single
quotes but not for double quotes. Here's what I changed it to:

DoCmd.OpenForm "frmCorrectiveActionRMA", , , "[RMA#] = " & Chr(34) &
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & Chr(34), , ,
Me![RMA]

Am I doing something else wrong?

Should I also change the code on the line that has the [CustPO]
argument?

:

Whenever you use a particular character (such as ") as a delimiter
in
SQL
and that character appears in the text, you need to double up the
character.
However, you have the option of using a single quote (Chr(39))
rather
than a
double quote (Chr(34)):

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(39) &
Me![RMA]
& Chr(39), , , Me![RMA]

If CustPO can also have single quotes in it in addition to double
quotes,
you'll have no choice but to go the double-up route. Assuming
you're
using
Access 2000 or newer:

DoCmd.OpenForm "frmCorrectiveAction", , , _
"[RMA#] = " & Chr(34) & _
Replace(Me![RMA], Chr(34), Chr(34) & Chr(34)) & _
Chr(34), , , Me![RMA]

You might take a look at my May, 2004 "Access Answers" column in
Pinnacle
Publication's "Smart Access" where I talk about this. You can
download
the
column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message Sorry about that. I meant to post the code...

If Len(Me.OpenArgs) > 0 Then
Me![RMA#].DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)
Me![CustPO].DefaultValue = Chr(34) & [Forms]![frmRMA]![CustPO] &
Chr(34)
End If

I have this OpenArg statement on a command button on my "frmRMA":

DoCmd.OpenForm "frmCorrectiveAction", , , "[RMA#] = " & Chr(34) &
Me![RMA]
&
Chr(34), , , Me![RMA]

If there is a " mark in the "CustPO" on my frmRMA then it won't
pass
the
argument.



:

How are you passing the data? Show us the code... <g>

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


"Secret Squirrel" <[email protected]>
wrote
in
message
I'm using the OpenArgs function to pass data from one form to
another.
The
fields that I'm passing the data to and from are both text
fields.
Why
is
it
that if the field that I'm passing from has a " mark in it
then
it
won't
pass
that field's data? Is there a way to fix this so it will allow
the
data
to
be
passed even if there is a " in the data?
 
Secret Squirrel said:
So should I just replace the Chr(34) with " marks? If so, do I just double
them up to allow the data to be passed through with either single or double
quotation marks in it?

No. While chr(34) and paired quote marks are needed for concatenating
strings within VBA code they aren't needed for the openargs.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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

Back
Top