Syntax Question

dzirkelb

Registered User.
Local time
Today, 15:13
Joined
Jan 14, 2005
Messages
180
I have the following code, which when the button is pressed, a website is supposed to open with the quote number placed in the link itself. I need to pull the quote number from either the form or the query which is used to display data from the form. Anyways, here is my code:

Code:
    Dim stAppName As String
    Dim intQuote As String

    stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://ecis.deei.com/quote_entry_main1.asp?QuoteNum="
    intQuote = [Quote #].Value
    stAppName = stAppName & intQuote
    Call Shell(stAppName, 1)

I get an error on the following line:

intQuote = [Quote #].Value

Saying "overflow"

The field name is Quote #, and I am unable to change the name or the name in the query as there are too many forms that would be affected. How do I change the Quote # to work in my code? Thanks!
 
Try
intQuote = Me![Quote #].Value

Hope this helps?
 
Still brings up overflow.
 
Try Dim intQuote As Variant and see what happens. What is the Data Type of the [Quote #] field?
 
With the pound sign (#) being a reserved character to delimit dates, I don't know of a good way around it, except that maybe [Quote #].Value is maybe returning something that is actually not what you think it is returning.
Just to give it a final shot try
Me![Quote #] instead.

Hope this helps?
 
Changing it to Variant type fixed the problem. Thanks guys!
 

Users who are viewing this thread

Back
Top Bottom