Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-09-2003, 03:26 PM   #1
Registered: Apr 2003
Posts: 178

Rep: Reputation: 30
Bug in MS Access Code

I had a Microsoft Access 2000 form. When I clicked on the button
with the code below it gives me an error

"compile error: user-defined type not defined"
It highlighted the error on the code

Dim Dbs As Database

Option Compare Database
Option Explicit

Private Sub Command1_Click()

    Dim Dbs As Database
    Set Dbs = CurrentDb

    Dim Tenant_Number_Temp As String
    Dim Unit_Number_Temp As String
    Dim Last_Name_Temp As String
    Dim First_Name_Temp As String
    Dim counter As Long
    Tenant_Number_Temp = "T-100-11-2-1999"
    Unit_Number_Temp = "1000"
    Last_Name_Temp = "Sacramento"
    First_Name_Temp = "Jayson and John"
    counter = 0
    Do While counter < 10
        counter = counter + 1
        Text_10.Text = counter
        Dbs.Execute " INSERT INTO Customer " _
        & "(Tenant_Number, Unit_Number, Last_Name, Fist_Name) VALUES" _
        & "('" & Tenant_Number_Temp & "','" & Unit_Number_Temp & "','" & Last_Name_Temp & "','" & First_Name_Temp & "');"
    MsgBox "The loop made " & counter & " repetitions."
End Sub
Old 10-09-2003, 03:43 PM   #2
Registered: Apr 2001
Location: Cambridge, England
Distribution: Slackware 10, Fedora Core 3, Mac OS X
Posts: 617

Rep: Reputation: 30
Well maybe there is something syntaxically wrong with that statement. Maybe you should ask this on a MS Access forum (or atleast a windows forum).

Its very possible that few people in linux world know Visual Basic for Applications. I for one have forgotton most stuff.

Old 10-09-2003, 03:47 PM   #3
Registered: Apr 2003
Posts: 178

Original Poster
Rep: Reputation: 30

"Violence is the refuge of the incompetant"
--Isaac Asimov

I agree. Write your congressman, but nothing will change, because


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kde: i want to access the logout source code and change it. Doomhammer Linux - Software 1 10-18-2004 02:13 PM
Possible gamepad code bug? Requesting testers. Dr Twox Linux - Hardware 1 07-09-2004 09:24 PM
error in Access 2000 code Linh Programming 2 10-13-2003 10:42 AM
Bug in c code calling bash code Linh Programming 11 08-12-2003 05:27 AM
Bug in C code Linh Programming 3 07-07-2003 07:06 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration