Compile error: User-defined data type not defined! 
Author Message
 Compile error: User-defined data type not defined!

Hi all,

I hope that someone can help me. Every time I compile my code I get an error on the line where it says:

    dim dbs as database

The error message is "Compile error: User defined type not defined". Ihave no problem in Access 95, but in Access 2000 this happens. Please help!

Thanks a million in advance!

f

Here's the code:

Private Sub FillOptions()
' Fill in the options for this switchboard page.

    ' The number of buttons on the form.
    Const conNumButtons = 8

    Dim dbs As database
    Dim rst As Recordset
    Dim strSQL As String
    Dim intOption As Integer

    ' Set the focus to the first button on the form,
    ' and then hide all of the buttons on the form
    ' but the first.  You can't hide the field with
    ' the focus.
    Me![Option1].SetFocus
    For intOption = 2 To conNumButtons
        Me("Option" & intOption).Visible = False
        Me("OptionLabel" & intOption).Visible = False
    Next intOption

    ' Open the table of Switchboard Items, and find
    ' the first item for this Switchboard Page.
    Set dbs = CurrentDb()
    strSQL = "SELECT * FROM [Switchboard Items]"
    strSQL = strSQL & " WHERE [ItemNumber] > 0 AND
    [SwitchboardID]=" & Me![SwitchboardID]
    strSQL = strSQL & " ORDER BY [ItemNumber];"
    Set rst = dbs.OpenRecordset(strSQL)

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ( http://www.*-*-*.com/ ).
Version: 6.0.166 / Virus Database: 79 - Release Date: 20/06/00



Sat, 25 Jan 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Compile Error: User-defined type not defined

2. Compile Error - User defined type not defined

3. Compile Error - User-Defined type not defined

4. Compile error: User-defined type not defined

5. Microsoft Visual Basic Compile Error: Uder-defined type not defined

6. User-Defined type not defined error (MAPI.Session)

7. user defined type not defined error help please

8. User-Defined type not defined error (MAPI.Session)

9. ComctlLib; compiler error: User-defined type not defined

10. Help!!-NEWBIE - Application Wizard -(WROX BOOK) Error- User defined type not defined

11. Error: User-defined type not defined

12. Help!!-NEWBIE - Application Wizard -(WROX BOOK) Error- User defined type not defined

 

 
Powered by phpBB® Forum Software