Brian Butters
Junior Member
- Local time
- Today, 14:39
- Joined
- Sep 4, 2001
- Messages
- 25
I have an enquiries database on the server used by several people. It's split front and back end and I have 2 front ends - one for 2000 users and one for 97 users. The front ends are MDE files. Everyone's happy except one of the 97 users. There is a switchboard with buttons to get to various forms. They all work on his except for one form. This form On Open uses a subroutine that looks down the list of quotations issued to find the next free number. The early part of the code is
Function NextNumber() As Long
'Loops through qryNewNumber to provide the next
'70,000 series number by searching for the first unused number
Dim DB As Database
Dim rs As Recordset
Dim Difference As Integer
Dim ThisID As Long, LastID As Long
'Requery qryQuote
'qryNewNumber is ordered by ascending QuoteID and needs to be run first
'in case a record has been changed or deleted in tblQuote.
DoCmd.OpenQuery "qryNewNumber", acNormal, acEdit
DoCmd.Requery ""
DoCmd.Close acQuery, "qryNewNumber"
Set DB = CurrentDb()
Set rs = DB.OpenRecordset("qryNewNumber")
'Go to the first record
rs.MoveFirst
ThisID = rs!QuoteID
LastID = ThisID
It stops at the line Set DB = Current Db() with a message ActiveX component can't create object. Why should that happen on his PC and no one elses.
Any ideas?
Function NextNumber() As Long
'Loops through qryNewNumber to provide the next
'70,000 series number by searching for the first unused number
Dim DB As Database
Dim rs As Recordset
Dim Difference As Integer
Dim ThisID As Long, LastID As Long
'Requery qryQuote
'qryNewNumber is ordered by ascending QuoteID and needs to be run first
'in case a record has been changed or deleted in tblQuote.
DoCmd.OpenQuery "qryNewNumber", acNormal, acEdit
DoCmd.Requery ""
DoCmd.Close acQuery, "qryNewNumber"
Set DB = CurrentDb()
Set rs = DB.OpenRecordset("qryNewNumber")
'Go to the first record
rs.MoveFirst
ThisID = rs!QuoteID
LastID = ThisID
It stops at the line Set DB = Current Db() with a message ActiveX component can't create object. Why should that happen on his PC and no one elses.
Any ideas?