Error in VB code
Hi
Can anyone help me. I keep getting a missing operator error witb the following query. I'm appending a record to a table. Ive basically copied the sql from query design but added a parameter.
Here's query - it's a long one
db.Execute "INSERT INTO tblARCHIVE ( UserID, UpdateDate, Name, [Section], Room, DataPoint, ExtensionNo, IALSServerUserName, [Group], EmailAddress, ComputerWorkgroup, ComputerDescription, SHTageCPU, SHTagMonitor, SHTagMisc, ComputerType, IPAddress, NetworkCard, NetworkPrinter, Bios, Model, Memory, Processor, HardDisk, CPU, Monitor, Mouse, Keyboard, CDDrive, Other, Year2000Checks, EthernetAddress, MaintenanceHistory, SHPrinterTag, AllocationNo, Type, SerialNumber, SupportPack, Expires ) " & _
"SELECT Users.UserID, Users.UpdateDate, Users.Name, Users.Section, Users.Room, Users.DataPoint, Users.ExtensionNo, Users.IALSServerUserName, UsersGroups.Group, Users.EmailAddress, Computers.ComputerWorkgroup, Computers.ComputerDescription, Computers.SHTageCPU, Computers.SHTagMonitor, Computers.SHTagMisc, Computers.ComputerType, Computers.IPAddress, Computers.NetworkCard, Computers.NetworkPrinter, Computers.Bios, Computers.Model, Computers.Memory, Computers.Processor, Computers.HardDisk, Computers.CPU, Computers.Monitor, Computers.Mouse, Computers.Keyboard, Computers.CDDrive, Computers.Other, Computers.Year2000Checks, Computers.EthernetAddress, Computers.MaintenanceHistory, Printers.SHPrinterTag, Printers.AllocationNo, Printers.Type, Printers.SerialNumber, Printers.SupportPack, Printers.Expires " & _
"FROM (Users INNER JOIN (Computers INNER JOIN Printers ON Computers.ComputerName = Printers.ComputerName) ON Users.UserID = Computers.UserID) INNER JOIN UsersGroups ON Users.UserID = UsersGroups.UserID WHERE (((Users.Name)=" & strUsername & ")));"
Many thanks
|