simple message>Hi not working

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
pinkpanther
Newbie
Posts: 9
Joined: Tue Aug 09, 2005 3:39 pm

simple message>Hi not working

Post by pinkpanther » Tue Aug 09, 2005 3:41 pm

Can you please see why the Message>tech errors out
It says compilation error

VBSTART
set ShipDB = CreateObject("ADODB.Connection")
ShipDB.Open "maketickets"
SQLString = "select * from FLINLAND"
set rsPickList = ShipDB.Execute(SQLString)
rsPickList.MoveFirst
Function GetNextRecord
If Not rsPickList.EOF then
tech = rsPickList.Fields("Technician")
Message>tech
else
GetNextRecord = 0
end if
End Function
ShipDB.Close
VBEND
Pinkpanther

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Aug 09, 2005 3:45 pm

You're confusing VBScript code with native Macro Scheduler code. Replace Message>tech line with:

MsgBox tech

VBSTART
set ShipDB = CreateObject("ADODB.Connection")
ShipDB.Open "maketickets"
SQLString = "select * from FLINLAND"
set rsPickList = ShipDB.Execute(SQLString)
rsPickList.MoveFirst

Function GetNextRecord
If Not rsPickList.EOF then
tech = rsPickList.Fields("Technician")
MsgBox tech
else
GetNextRecord = 0
end if
End Function

ShipDB.Close
VBEND
MJT Net Support
[email protected]

pinkpanther
Newbie
Posts: 9
Joined: Tue Aug 09, 2005 3:39 pm

THANKS

Post by pinkpanther » Tue Aug 09, 2005 4:28 pm

:)
Pinkpanther

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts