ok I was trying to do something real simple I thought
Me.Clinic.DefaultValue = Me.Clinic.Value
I got error either ! or . misused or not found...something like that I
thought ok how can you not find the variable that this field is tied
to.
ok it takes a variant so maybe its
Me.Clinic.DefaultValue = Me.[Clinic].Value
no thats not it so I just tried everything then someone said no do
this
Me.Clinic.DefaultValue = CStr("""" & Me.Clinic.Value & """")
well this works but what I can NOT get thru my head is why doe you
have to have 4 " ???
explaining it to me won't work...where can I go read about these types
of things so I can get them thru my thick head?
its like a thing I did once for school it was getting data into a
database from a web page
simple=====
string sCommand = "INSERT INTO tblAgreement(ContractNumber, ExpDate,
Status, Allowed) VALUES (" + ContractNumber +",'" + ExpDate + "','" +
Status.ToString() + "'," + Allowed.ToString() + ");"
but it took me 2 days to get it right....AHHHHHHHH I can't get these
parsers and stuff
thanks for any help
Jerry 2 1713
sparks wrote: ok I was trying to do something real simple I thought Me.Clinic.DefaultValue = Me.Clinic.Value
I got error either ! or . misused or not found...something like that I thought ok how can you not find the variable that this field is tied to. ok it takes a variant so maybe its Me.Clinic.DefaultValue = Me.[Clinic].Value
no thats not it so I just tried everything then someone said no do this
Me.Clinic.DefaultValue = CStr("""" & Me.Clinic.Value & """")
well this works but what I can NOT get thru my head is why doe you have to have 4 " ???
From A97 Help topic "Quotation Marks In Strings"
Include Double Quotation Marks
You should include double quotation marks within the criteria argument
in such a way so that when the value of the variable is evaluated, it
will be enclosed within the quotation marks. Within a string, you must
use two sets of double quotation marks to represent a single set of
double quotation marks. You could construct the criteria argument as in
the following example:
"[LastName] = """ & strName & """"
When the variable strName is evaluated and concatenated into the
criteria argument, each set of two double quotation marks is replaced by
one single quotation mark. The criteria argument becomes:
"[LastName] = 'Smith'"
*******
Note: The above is an error in MS Help. Access does not change double
quotes into single quotes. It would be "[LastName] = "Smith""
*******
This syntax may appear more complicated than the single quotation mark
syntax, but it enables you to embed a string that contains an apostrophe
within the criteria argument. It also enables you to nest one or more
strings within the embedded string.
Include a Variable Representing Quotation Marks
You can create a string variable that represents double quotation marks,
and concatenate this variable into the criteria argument along with the
value of the variable. The ANSI representation for double quotation
marks is Chr$(34); you could assign this value to a string variable
called strQuote. You could then construct the criteria argument as in
the following example:
"[LastName] = " & strQuote & strName & strQuote
When the variables are evaluated and concatenated into the criteria
argument, the criteria argument becomes:
"[LastName] = "Smith"" explaining it to me won't work...where can I go read about these types of things so I can get them thru my thick head?
its like a thing I did once for school it was getting data into a database from a web page
simple=====
string sCommand = "INSERT INTO tblAgreement(ContractNumber, ExpDate, Status, Allowed) VALUES (" + ContractNumber +",'" + ExpDate + "','" + Status.ToString() + "'," + Allowed.ToString() + ");"
but it took me 2 days to get it right....AHHHHHHHH I can't get these parsers and stuff
But didn't you feel better when you got it working?
thanks for any help
Jerry
I guess its what I am seeing here
CStr("""" & Me.Clinic.Value & """")
this looks to me like it should be """ & Me.Clinic.Value & """
why the extra "
if you have to put the " in quotes why do you have to put 2 sets of
quotes?
Jerry
On Wed, 31 Aug 2005 14:17:15 GMT, Salad <oi*@vinegar.com> wrote: sparks wrote:
ok I was trying to do something real simple I thought Me.Clinic.DefaultValue = Me.Clinic.Value
I got error either ! or . misused or not found...something like that I thought ok how can you not find the variable that this field is tied to. ok it takes a variant so maybe its Me.Clinic.DefaultValue = Me.[Clinic].Value
no thats not it so I just tried everything then someone said no do this
Me.Clinic.DefaultValue = CStr("""" & Me.Clinic.Value & """")
well this works but what I can NOT get thru my head is why doe you have to have 4 " ???
From A97 Help topic "Quotation Marks In Strings" Include Double Quotation Marks
You should include double quotation marks within the criteria argument in such a way so that when the value of the variable is evaluated, it will be enclosed within the quotation marks. Within a string, you must use two sets of double quotation marks to represent a single set of double quotation marks. You could construct the criteria argument as in the following example:
"[LastName] = """ & strName & """"
When the variable strName is evaluated and concatenated into the criteria argument, each set of two double quotation marks is replaced by one single quotation mark. The criteria argument becomes:
"[LastName] = 'Smith'"
******* Note: The above is an error in MS Help. Access does not change double quotes into single quotes. It would be "[LastName] = "Smith"" *******
This syntax may appear more complicated than the single quotation mark syntax, but it enables you to embed a string that contains an apostrophe within the criteria argument. It also enables you to nest one or more strings within the embedded string.
Include a Variable Representing Quotation Marks
You can create a string variable that represents double quotation marks, and concatenate this variable into the criteria argument along with the value of the variable. The ANSI representation for double quotation marks is Chr$(34); you could assign this value to a string variable called strQuote. You could then construct the criteria argument as in the following example:
"[LastName] = " & strQuote & strName & strQuote
When the variables are evaluated and concatenated into the criteria argument, the criteria argument becomes:
"[LastName] = "Smith"" explaining it to me won't work...where can I go read about these types of things so I can get them thru my thick head?
its like a thing I did once for school it was getting data into a database from a web page
simple=====
string sCommand = "INSERT INTO tblAgreement(ContractNumber, ExpDate, Status, Allowed) VALUES (" + ContractNumber +",'" + ExpDate + "','" + Status.ToString() + "'," + Allowed.ToString() + ");"
but it took me 2 days to get it right....AHHHHHHHH I can't get these parsers and stuff
But didn't you feel better when you got it working?
thanks for any help
Jerry
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: milkyway |
last post by:
Hello,
I have an HTML page that I am trying to import 2 .js file (I created)
into. These files are: row_functions.js and data_check_functions.js.
Whenever I bring the contents of the files into...
|
by: greenflame |
last post by:
How can I tell if a variable. I want ot tell whether two variables are:
1. Both numbers. Just a number. same as the number object in
javascript.
2. Either one is a string containing a number....
|
by: Helmut Giese |
last post by:
Hello out there,
I am a rather experienced C programmer. However, today I got a
javascript assignment because someone left (something like: "You're a
great programmer - you'll handle this.") and I...
|
by: MLH |
last post by:
If I cut it from the rest of the SQL, the query runs fine. But when
I leave the following WHERE clause in there, Access tells me there's
a missing Operator?
WHERE (((tblVehicleJobs.SerialNum)...
|
by: Walter Dnes (delete the 'z' to get my real address |
last post by:
I'm trying to initialize an array of error messages, so that I can
print out an error message by using the 'nth string in an array, e.g.
printf("%s\n", messages);
I'm still hazy on arrays of...
| |
by: Henry Stock |
last post by:
I was just looking that the Word Document Model and at code for creating a
Word Document. The C# code appears to have several more parameters for
creating a Word Document than does Visual Basic. ...
|
by: jazzMan007 |
last post by:
Hi All -
I'm using the new UrlMappings feature in an ASP.NET 2.0 application.
I'm using the unique urls, mapped to shared files, in the site map. So
for example, I have pages A, B, & C...all of...
|
by: Jan |
last post by:
This is my problem:
When i have more than 3 lines of text in de tempArray. Iget the following
message:
An unhandled exception of type 'System.NullReferenceException' occurred in
Allen's...
|
by: William Morgan |
last post by:
Public Declare Sub ydec_set_callback Lib "yDecLib.dll" (ByVal CallbackFunc As Long)
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal lpvDest As String, ByVal lpvSource As...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |