Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Winsock.remotehost Syntax Problem


hi
I have had Winsock going before , but now I can seem to enter the
.RemoteHost name properly
What is the format for the name?
ie. username.ispname.co.nz
username@ispname.co.nz or what?

I get error # 11004 when I do a .Connect , indicating the host was not found.

(I have a ADSL connection made (email program works).)

I have tried to connect using 'open' command in TelNet in DOS,
but same result.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Winsock .remotehost Error
I get an error on the .remotehost saying data or method member not found when I run the sample chat from winsockvb on 2 different computers on a network. I messed around with the IP but I still cant get it to work. It only works on one computer chatting with yourself.
Any help? ,
Thanks

Resolved: How Can You Get The Ip Of A Remotehost With Winsock?
Anyone know?

lets say you have a name like "www.google.ca", how can u get its ip with vb (quickly?)

MSAccess->Winsock RemoteHost Issue
Hello:

I am having troubles connecting with Winsock and hope someone can point me in the right direction. My code looks like this :

Private Sub cmdConnect_Click()
' set up the Winsock properties
' and start the connect sequence
With Winsock3
.RemoteHost = "216.109.117.204"
.RemotePort = "10101"
'.RemoteHost = "127.0.0.1"
'.RemotePort = "10101"
.Connect
End With
End Sub

When I use the loopback RemoteHost="127.0.0.1" to check my code it works fine. As soon as I put in an actual IP address, like 216.109.117.204 (Yahoo.com) MSAccess gives me the error 40020, "Invalid operation at current state" at the line .RemoteHost = "216.109.117.204". Any one have an idea what is wrong?

Thanks

Server Winsock's RemoteHost Blank?
IIRC, Winsock.RemoteHost for a server application is supposed to return the DNS Address of the connecting client... but mine only returns zerolength strings. I've a feeling it's got something to do with the fact that I'm behind a router (Linksys, if it matters). The right port is forwarded and all that, the connection goes through, but I can't read the DNS Address. Help?

RemoteHost Error (totally New To Winsock)
Hello,
Its my first time using winsock (and my 3rd day learning VB)
But i am trying.. so bare with me..

I was following a tutorial on WinsockVB site (and even looked at others)
and i have a Sub like so...


Code:
Private Sub cmdConnect_Click()
Winsock.RemoteHost = "127.0.0.1"
Winsock.RemotePort = 10101
Winsock.Connect
End Sub
But VB keeps on giving me an error here.. I get a window saying..


Quote:




Runtime error 40020

Invalid operation at current state




and when i debug it selects the line..
Winsock.RemoteHost = "127.0.0.1"


I was refering to this tutorial..
http://www.winsockvb.com/article.php...le_id=3&page=4
Any ideas ?

Thanks,

Drew
ps: I am thinking its my computer for some reason becuase i have downloaded some source code and i dont think any winsock apps work on my PC... whats up ?

Winsock Syntax? (To Request A Website With The Winsock Control)
Ok, I don't know very much about Winsock and am just now starting to use it. I'm making an anonymity program that modifies referer and user agent data. I managed to find an example of how its done on planetsourcecode.com but there's a few things that aren't working.

Anyway, when this string is sent, it sends the headers and a request for index.html from the connected host (winsock1.connect domain.com 80).

GET index.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-comet, */*
Accept-Language: en
Accept-Encoding: gzip , deflate
Cache-Control: no-cache
Proxy-Connection: Keep-Alive
User-Agent: Whatever
Referer: www.whatever.com

But when I used the website http://ipid.shat.net/ as the domain to see if code mdified the headers or not, it directed me instead to just www.shat.net. How would a browser request information to ipid.shat.net?

Also, I noticed that by sending just that information, cookies don't work properly. What other tags do I have to add onto that for it to recieve my session information? Thanks a lot.

Winsock Syntax
I am working on a VB 6 app that will communicate with a third party server control. The server control wants inforamtion posted to it in the following format.

http://SQL200:1000/cgi-bin/auth.cgi?ya_da_ya_da_ya

sql2000 = local server's name
"ya_da_ya_da_ya" = information to be posted.

I have used the VB winsock control in my app to connect to the server and send the information.

Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect "10.0.0.113", "1000"

Winsock1.SendData "ya_da_ya_da_ya"

I have confirmed these three lines of code successfully connect to the server app and send the information. However, since I did not incluce the location of "cgi-bin/auth.cgi", the server does not reply.

How do I connect to the location "cgi-bin/auth.cgi"?
I have tried numerous combinations but they are all just guesses. I do not know how or where to put the "cgi-bin/auth.cgi" in the connect statement.

When I open a browser on the sql2000 machine and type in:
http://localhost:1000/cgi-bin/auth.cgi?ya_da_ya_da_ya, the server responds with the correct information.
I am trying to create a winsock control that that sends this data and listens for the response.

Thanks,
pat


RemoteHost Instead Of RemoteHostIP
heyy all..

just a simple question..can i totally substitue RemoteHostIP by RemoteHost?? Since the IP address of a machine changes, but the LocalHostName doesnt, so it would be much better. So this way, i wont need to worry about the ip address. Is it possible?

Remotehost Checker?
is there any way to check if target remotehost is existing using winsock udp protocol?

How To Connect To RemoteHost
Hi ,

Can u pls help me in this....? How to connect to the Remote Host and How to view the contents of connected Host Folder... If I want to see the computer who are in my group how to get it.... so please help me to get it.....

Thank you
Vijay

Using A Seperator With Winsock (syntax)
Hi all, im curious to know how i can accomplish something like this...

winsock1 sends data with 4 seperate items. (item1|item2|item3|item4)

how can i setup a way to seperate them like that

winsock2 (server) received the data string and pulles the items apart. and puts them where they need to be. and sends the result back to the clients.


Thanks

Winsock, Syntax Error...
I'm trying to connect to a ftp server with the winsock control.

I have setup the winsock controls remote hsot and port.

The data arrival event puts the data recived in a text box.
I see that the ftp server wants the username.

I have another text box where I can enter commands to send with the senddata method of the winsock control. But when I try to send the Username to the ftp server, all I get back is "500 Syntax error, Command not recognized".

I have tried to use USER *****, and only ******. I also have tried to add vbcrlf after the string to be sent. I have tried to add vbcrlf before the string to be sent...

What are I doing wrong???

/Smirre

Convert SQL Server SQL Syntax To MS Access Syntax
How can I convert SQL server SQL syntax to MS Access Syntax?
What is the differences, are there any conversion classes or modules I can
download.
I never used any SQL functions, just SELECTing, INSERTing, DELETEing and UPDATEing
and just the SQL function to get the latest added row, but that is not really a problem, I'll should be able to sort that out.

Thanx in advance
NL



Edited by - NLategan on 7/11/2004 9:15:21 AM

Any One Help Please ! VB Syntax Or Crystal Report Syntax Problem Help Please !
Hi friends,

 First I will say what I am trying to do.

     When I Choose the Itemname from two combo boxes
The report shows the Item details for the Items Between the two combo boxes.

There are two combo boxes CmbFrom and CmbTo
I am also passing the date here in the textbox txtfrom and txtto and assigning fdt=txtfrom.Text and tdt = txtto.Text
  
I face a problem, when I write the code like below. kindly clear me,

        dim sf as string
Private Sub cmdPreview_Click()

 sf = "{Stock.ItemCode} Between '" & cmbFrom.Text & "'and'" & cmbTo.Text & "'" & "AND" & "{Sales.InvDate} in Date(" & _
 Format(fdt, "YYYY,M,D") & ") to Date(" & _
 Format(tdt, "YYYY,M,D") & ")"

End Sub

it shows the error like this 'Error in formula <Record Selection>' "The remaning text doesnot appear to the part of formula".

instead of this when I write the code as below

Private Sub cmdPreview_Click()

 strsf = "{Stock.ItemCode} in'" & cmbFrom.Text & "' to '" & cmbTo.Text & "'" & "AND" & "{Sales.InvDate} in Date(" & _
 Format(fdt, "YYYY,M,D") & ") to Date(" & _
 Format(tdt, "YYYY,M,D") & ")"

End Sub

the report is showing the correct value whe I choose the very First Item in the cmbFrom combo and last Item in the cmbTo comb, but when I choose a Item in the middle order from CmbFrom and CmbTo combobox
it is not showing all the items between the two combo box. it shows only the one item which I choose in CmbFrom combo box. but i need to show all the Items in report between the two combo boxes.

Kindly correct me the code or suggest me how to execute it, or if there is any other way kidnly reply.

Thank you very much,
Chock.
Thank you very much,
Chock.


 


<HTML>
<B><font color="#008000">HAVE A NICE DAY !</font></B>
<HTML>

Edited by - chs on 2/5/2003 4:19:35 AM

Winsock State 8 - Peer Closes The Connection Leaving Winsock High And Dry
I am debugging some web/proxy-serving code. I am stumped.

I get Winsock state 8 - Peer is closing the connection
Then Winsock error message wrong protocol or connection state.

It seems to me that Winsock closes before it can finish sending all of its data.

How can I keep Winsock in state 7 - Connected?


Thanks...

Winsock Error (System Lockup Upon Winsock Execution)
Has anyone encountered an issue when running the winsock command and either a .listen or .connect locks up your VB Studio? This is occurring on my system and I'm not sure if its a problem with my current DLL or if I'm just not doing something correctly.

Please help.

Chris, Baltimore.

Winsock - Send PictureBox Contents Thrue Winsock?
Hey all, is it possible to send the contents of a PictureBox thrue a Winsock?

I know i can save the contents first to file and then send as file, but wondering this is possible, the purpose is in my chat project i have a webcam capture feature wich works fine, but i can't figure out how i can send this stream, did some searches but not found any results about it.

=============================================
aka Red2048.

Very Frustrating Winsock Bug.. Winsock Stops Responding After A While.
I have about 100 winsocks in an array handling a bunch of tasks.

The program seems to work fine for a while, but then for no reason, winsock stops responding. I can receive and send thosuands of packets before this happens but when the bug occurs it is extremely frustrating.

Winsock seems to die completely. DataArrival never fires, I cant make new connections (Always stuck on 'Connecting..'), its a mess. Closing the program and reopening it does not solve the problem - I have to close VB6 entirely and reopen it for the application to work again.

Has anyone dealt with something like this in the past?

I have no idea whats wrong

Winsock Error &lt;winsock.getdata Strdata
Hi

I am using winsock control named tcpclient in my application.
When i call the statement as

tcpclient.getdata strdata

It raises an error showing as

Runtime Error : "10054"
The connection is reset by remote side

I don know why this error is coming pls help me if uve any idea


Thanx

Will Winsock Get Timedout? Can Do Login On Winsock.connect?
Hi all,
Just wondering, let say I connect to a server using Winsock and leave the connection open... does Winsock timeout or close that connection? If yes, how long winsock give before it timeout/close the connection?

Is it possible to do a login on winsock.connect; ie: winsock.connect userid, pwd? I'm thinking if possible everytime i connect, i pass the userid and pwd to the server for validation... if all correct than accept the connection else reject... is this possible?

Thank You
Regards

WINSOCK CONTROL Vs WINSOCK REFERENCE
Why with a Winsock refernce events don't work and with a Winsock control events work?
"public withevents MySock as winsock". With this declaration, I can't use events (like connectionrequest ecc.).
With a WinSock control I can use events. WHY????

Winsock API Webserver (not Winsock Control)
Hi,
I'm trying to do a winsock webserver, that can handle lots of connections at once.
each new connection request creates a new instance of the winsock control
ie load winsock(1).....etc
it needs to be able to handle 200 users but it looses connection requests every so often and so some people cant connect I think this is because the winsock control cant handle so many connections at once. Would coding using the WIN API be better (quicker)???
Thanks
Paul

WinCE Winsock And Regular Winsock
Hello all

Is there a certain way that win CE winsock sends its data? for example.

in the regular winsock i do something like
winsock.senddata "Hello World"

in the CE winsock i msgbox the data that is received and it is in one msgbox. However, if I turnaround and send something from the CE winsock to the regular windows winsock i would get two msgboxes one containing the first letter of the message, and a second box containing the rest of the message? Any ideas?

ActiveX DLL's, Winsock And Winsock Events
If I create an ActiveX DLL that has an winsock control in it, do the events for the winsock control still occur?

Flushing In Winsock Control And Winsock API
I used to work in Java Sockets previously and there I have been using flush method of the associated stream with Socket class to make sure that the data I sent using Sockets is successfully sent; simple to flush the Socket.

But, here in Vb I can find any function or method fulfilling the same purpose. Can anyone give me some idea about how to do it with Winsock Control or Winsock API?

Normally winsock works quiet well but in my previous project I faced a related problem about transmitting data. Therefore, while using it for the second time, I am a concious about it and working on the solution to the 'data delay' problem before working on the actual system.

thanx

Syntax
Hi there,
Using a rich text box, how could I colour as you type kinda thing. I'm making a php script writter, so it would need to be for the php syntax colours.

So, how can I colour ; (end of line) as you type, and colour any thing after " untill you reach the next "?

-Neo

A Little Syntax Help
What would be the right way to right this so it works?


Code:
If sock1.sock <> active Then
winsock.remotehost = "66.444.2.2.1
winsock.remoteport = 25
winsock.connect
else
Blah blah
Like the top line is wrong. What is correct to find if the socket is already active?

VB Syntax
Hi, I'm new to VB and using Access

I want to be able to store values of the control (textbox) into a table using VB.

How to I go about it?

Vb Syntax
Hi there,
I'm new to vb6 programming and I'm creating a process using automation. I want to accomplish 2 things:

- Open a new document based on a customized template
- Insert a table(s) at a specific point within the new document.

Thanks Chuck Hartford

Is It Right Syntax?
Hi friends,
I try to have two nested block am I wright in syntax?

Thanks,
Elahe

Code
-------
If StDev(Log(dblTest)) > 2 Then
dblTest = Log(dblTest) / Log(10)
Else
If 0 < dblTest And dblTest < 1 Then
'........
ElseIf dblTest > 1 Then
'.........
End If
End If

Help With Syntax Please
I am using the following command to set a variable to the value of a subform on for "laptop user".

Set MachineNames = "laptop users"!machine_name

I get this error:

"compile error: Expected end of statement."


What am I doing wrong, please?

Thanks in advance

PS: Please note the space in the form name. the complete parent/child location of the field is:

form-tabctrol-page-subform-field

VBA Syntax
I am trying to kick off a report through VBA using a where clause which I can get to work for a numeric but I can't seem to get it to work for a literal.

Below is the syntax I am using for a numeric could anyone please tell me what I have to change for it to work with a literal ie "Marsh"

DoCmd.OpenReport stDocName, acPreview, , "[qryNotificationsByBroker]![BrokerAddressID] = 112"

I would be grateful for any help

Thanks

Conor M Hamill

Need Some Syntax Help Please.
Hi I'm a novice at VB so if this question seems silly, please excuse me. I'm trying to program an excel macro for a datasheet download that I frequently use at work. Because the datasheet can vary in the number of columns and rows I need to program in relative formulas to account for this. At the beginning of the macro I use a counter to determine the number of rows and columns and assign those values to a variable.

ColCount = Selection.Columns.Count
RowCount = Selection.Rows.Count

I then want to use those values to calculate the relative formulas. Can anyone tell me the proper syntax for this? When I use the macro recorder I get something like this:

ActiveCell.FormulaR1C1 = "=R[-12]C/R14C"

I want to substitute the hard numbers in the formula with the values stored in the variables. Also how do I enter a placeholder ($) into the above formula? I have tried to play with it a bit and have tried to do a bit of research without much luck. Thanks for the help!

Syntax Help
hi all ,

i have a code like his Sql = Sql & "A1" where sql is defined as string
and if i have to replace it with "A2" but i want to make it take value from the i value in the for loop

for( i=1 to 3) for every loop i want it to show as A1 , A2 and A3

Better Syntax
Is there a better way to write this function? seems a bit long. It's adding cell values and setting it to a variable.


Code:
intSpotValue = Range(somecell).Value + Range(somecell1).Value + Range(somecell2).Value + Range(somecell3).Value + Range(somecell4).Value + Range(somecell5).Value


Thanks

VBA Syntax?
I want to code a module below using 2 worksheets i.e "Data" and "Query" but not good in vba code.

Look in the datasheet at row2 for a value of 1, if found, then look at next row i.e. row3 for value found in the querysheet. If the individual value found is the same as in the querysheet individual column, it will write the date & rowno of row2 of datasheet and the value of 1 or 0 will be insert accordingly to the column into the querysheet.

This macro will run the loops from row2 of datasheet until the last row. New found items/values will be written row after row in the querysheet. Can anyone help.

Some questions concerning VBA syntax.

Q1) To use a workbook/worksheet
Q2) Do whil not eof() & Enddo.
Q3) Checking a range of cells for value
Q4) Skipping next row
Q5) Writing value to particular cell into particular cell
Q6) Do Case & Endcase with Select.

Can someone tell me what are these syntax in VBA.

Thank you.

Help With Syntax!
Is there a place where a Visual Basic user can get a list of all syntax? Whenever I go to work on a program I always run into code that I don’ know how to use and I can’t seem to find it listed anywhere and it’s often just a simple matter of wording, ordering the syntax correctly.
I also have another question. Can anyone please explain how a variable, function, and statement are different? I use them all the time but what are they fundamentally?

Thanks

Help With Some Syntax
Code:

If txtUsername <> Mid(c001A, 56, 1)
I am very familiar with programming in general (Experience with Java and C/C++. I've also done some VBA.). Now, I cannot find any good documentation for VB and I don't care for purchasing a book at this time.


<>
Equal operator?

Mid(c001A, 56, 1)
c001A is a constant... and 56 and 1 look like bounds... what does this function return?

Any good documentation links would also be very helpful!

Ryan

Syntax?
Hi,

I don't want to update my screen any more than necessary to keep flicker to a minimum. I WANT to say something like...

If Form1.Picture1(VC).Picture <> Nothing then
Set Form1.Picture1(VC).Picture = Nothing
Endif

OR

If Form1.Picture1(VC).Picture="C:Tape.GIF" then
.
.
.

Could someone tell me the correct syntax?

Thanks,
Len

VB 6 SQL Syntax
Hi
Could you please help and advice on below SQL statement
When run compile an error message prompted syntax error on update


'Select Inpoint as Inp, GrPoint as GrP from Temp Table.
Then Update the selected record into AttSum,
where EmpNo in Attsum exist in Temp.

Dim DB As New ADODB.Connection

DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "Attendance.mdb;Persist Security Info=False")

sSQLstr = " Update AttSum Set (GrP, GnP) = (select InPoint as InP,GrPoint as GrP from temp) Where EmpNo in ( Select EmpNo from temp ) "
DB.Execute sSQLstr

Thank You

Syntax?
I am testing this code to create a textbox by code (so I can generate forms depending on information already gathered).

Private Sub Command1_Click()
CreateMyTextBoxControl ("Hello World!")
End Sub

Public Sub CreateMyTextBoxControl(test)
' Create a new TextBox control using this constructor.
Dim textBox1 As New TextBox()
' Assign a string of text to the new TextBox control.
textBox1.Text = test

' Code goes here to add the control to the form's control collection.
End Sub

I get a syntax error when I click on the command button with the following being the offending code:

Dim textBox1 As New TextBox()

I got the code from MSDN. Anyone know whats wrong with it?? Please

(VB6 Enterprise by the way)

SQL Syntax
I know there's a similar thread already up but i'm doing the SQL slightly different. I'm stuck with the syntax below it worked fine until I put the ORDER BY bit in, I didn't think I needed it at first but the query is not getting the data in the order I was expecting.

Set mrecScaling = g_DataConnection.Execute _
("SELECT * FROM [tblScalingFactors] WHERE [Year] =" & Me.TxtDataYear & "ORDER BY [VehCat]")

cheers and thanks for looking

Rich

Help With Syntax
I have a holiday table in my DB and have start_date and finish_date as 2 fields. I also have a date picker on one of my forms. If the datepicker.value is equal to or between the start and finish date in my table I wish for some text boxes to go red how would i go about coding this?????

I wish to say some thing like:

if dtpicker.value "= or between" adodc10.recordset![Start_date] and Adodc10![Finish_Date] then x
else y

Any Help would be great

Next Syntax
I am making a tile engine which is almost done. I get an error though that says "Invalid Next control varriable refference". I will post the code if the upload dosent work

--objects---
tile(0) -image conrol array on from1 up to tile(7)
ground -image of ground


Code:
Form1
Private Sub Form_Load()
Map
End Sub

Module1
Dim img As Integer ' Declare an integer indexing variable.
Dim nIndex As Integer ' Declare an integer indexing variable.
Sub Map()
Dim tile(1 To 4)
tile(1) = "1" 'Sets the picture Value
tile(2) = "1"
tile(3) = "1"
tile(4) = "1"
For nIndex = 1 To 4
For img = 1 To 4
If tile(nIndex) = 1 Then Form1.tile(img).Picture = Form1.ground 'Detrimes what picture to display
Next nIndex
Next img[b]Problem occurs[/b]
End Sub

As you can see it checks which array index holds "1" then changes the tile array to grounds picture. The problem is I need to to do this to each tile which is the reason for "img"

Sql Syntax
What is the proper syntax for this?

This works fine:
rs.Open "select horsepower from toshiba where (product='E3') and (volts = '230')", Conn, adOpenStatic, adLockOptimistic

but when I add variables, it doesn't work:
rs.Open "select horsepower from toshiba where (product=CBOPRODUCT.TEXT) and (volts = cbovolts.text)", Conn, adOpenStatic, adLockOptimistic

SQL Syntax
I'm using a Dataenviroment in an ActiveX object.

Here's my SQL statement:
SELECT TOP 1 c_user, c_pass, c_email FROM dbo.tblmailbox
WHERE (c_email = '[emailaddress]')

"emailaddress" is a parameter passed from the webpage
<PARAM NAME="emailaddress" VALUE="email@christart.com">
Also the default value within the VB code is "email@christart.com"
Const m_def_emailaddress = "email@christart.com"

Unfortunately, this SQL code doesn't work. I get the following error:

Run-time error '3021'

Either BOF or EOR is True, or the current record has been deleted.
Requested operation require a current record.

I guess I got a zero recordcount.

When I try to run the query with out an the varible it works.
SELECT c_user, c_pass, c_email FROM dbo.tblmailbox
WHERE (c_email = 'email@christart.com')

So I figure either Im not setting my default parameter "emailaddress" correct or my SQL syntax is off.


Any advise whould be appreciated.

SQL Syntax
Hi

Overjoyed to discover this excellent forum. Hope someone might be able to help with the following.

I'm making a small VB application to allow non-access aware users to interogate a Acces database by select ing check boxes to indicate teir search criteria. The app is suppose to connect to the databse and run some SQL.

Mostly it's fine. But I'm having difficulty with some AND OR stuff: ( see below)


olA.DoCmd.RunSQL "SELECT [First Name], [Surname], [email], [selected], [Country], [Company],[ISHUB]" & _
"INTO contacts From [CONTACT DATA]" & _
"WHERE" & _
"[ISHUB]= '" & Text1.Text & "' AND [IT] ='" & Text16.Text & "' Or [TELCOM] ='" & Text17.Text & "' Or" & _
"[ISHUB]= '" & Text2.Text & "' AND [IT] ='" & Text16.Text & "' Or [TELCOM] ='" & Text17.Text & "' Or" & _
"[ISHUB]= '" & Text3.Text & "' AND [IT] ='" & Text16.Text & "' Or [TELCOM] ='" & Text17.Text & "' Or" & _

etc etc etc

Would be grateful for any help

thanx in advance

SQL Syntax
I'm having a little trouble getting the syntax correct on this sql statement...

Code:
Like '" & varButton & "%' Order By Lastname, Firstname", Conn
What I'm trying to do is have a variable followed by a wildcharacter in the where clause of the sql statement. Any help on syntax would be greatly appreciated. Thanks!

Bad SQL Syntax?
Ok, now Im running into the same problem. I know the variable prstfldCategory is getting passed to the procedure correctly, but not to the Recordset command. Do I have bad syntax again?

Private Sub InitTreePartName(pnodParent As Node, _
pstrfldCategory As String)

Dim pnodCurrent As Node
Dim prstCurrent As ADODB.Recordset
mcmdCurrent.CommandType = adCmdText
mcmdCurrent.CommandText = _
"SELECT DISTINCT fldSubCategory FROM tblInventory " &amp; _
" WHERE fldCategory = " &amp; pstrfldCategory &amp; ""
Set prstCurrent = mcmdCurrent.Execute

Copyright © 2005-08 www.BigResource.com, All rights reserved