DAO Error

R

rebyter

I have a form that calls to a query in an mdb to populate a combo-box with
data. This works just fine on most of the computers and was working well on
the rest until yesterday. Basically now on 3 or 4 computers when attempting
to open the form the user gets a

"VBA Runtime Error '3275'
Unexpected error in the Database Driver (12294)".

I cannot find any differences on these PCs and the rest. We use W2K with
Office 2K patches and updates are all up to date.
 
J

Jezebel

As the error message says, this is a database driver error, not a Word
error. Although you can't find them, obviously there ARE differences between
your PCs. It might be something as simple as date literals in your SQL
statement, with different date formats on the different PCs.
 
R

rebyter

I see what you are saying, here is the full VBA that is causing the issue:

Private Sub Userform_Initialize()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim NoOfRecords As Long
Set db = OpenDatabase("\\atidata\\pcounter\ppopup.mdb")
If ProjectForm1.CheckBox1 = 0 Then
Set rs = db.OpenRecordset("SELECT * FROM Projectname")
GoTo Last
Else
Set rs = db.OpenRecordset("SELECT * FROM Projectnum")
GoTo Last
Last:
End If
With rs
.MoveLast
NoOfRecords = .RecordCount
.MoveFirst
End With
ComboBox1.ColumnCount = rs.Fields.Count
ComboBox1.Column = rs.GetRows(NoOfRecords)
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub

Can you give me any idea where to begin looking? Again this worked on these
PC's last week and I cannot think of any reason why orwhat they would have
changed since then.
 
M

Marco

I don't see anything in the procedure that would generate an error.
Which line is causing the error? Which DAO library are you using?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top