Add customer function not working HELP (1 Viewer)

goldstar19821982

Registered User.
Local time
Yesterday, 19:23
Joined
Feb 17, 2008
Messages
78
hi there could ne1 help me out i am trying to get the add customer function working on my database but im getting a compile error and it is asking me to change the following coding

Function AddCustomer() As Long
'used to add a new Customer to the system, function called by frmCustomerList

'Declare and initialise the database object
Dim dbCustomer As Database
Set dbCustomer = DBEngine.Workspaces(0).Databases(0):(
 

Rabbie

Super Moderator
Local time
Today, 03:23
Joined
Jul 10, 2007
Messages
5,906
hi there could ne1 help me out i am trying to get the add customer function working on my database but im getting a compile error and it is asking me to change the following coding

Function AddCustomer() As Long
'used to add a new Customer to the system, function called by frmCustomerList

'Declare and initialise the database object
Dim dbCustomer As Database
Set dbCustomer = DBEngine.Workspaces(0).Databases(0):(

I have just tried this and it compiles without error.

You may need to make sure that the Microsoft Object library is ticked in the References in the Tools Menu

Also it may help to have

Dim dbCustomer As DAO.Database
 

goldstar19821982

Registered User.
Local time
Yesterday, 19:23
Joined
Feb 17, 2008
Messages
78
thank you for your help im still having problems i ve tried the methods you have suggested must by my access
 

goldstar19821982

Registered User.
Local time
Yesterday, 19:23
Joined
Feb 17, 2008
Messages
78
im gettin a compile error message

user defined type not defined

thank you
 

goldstar19821982

Registered User.
Local time
Yesterday, 19:23
Joined
Feb 17, 2008
Messages
78
can i send anyone the database to see where i am going wrong please helllp:(
 

Rabbie

Super Moderator
Local time
Today, 03:23
Joined
Jul 10, 2007
Messages
5,906
Post your DB on the forum. Do a compact and repair and then Zip it.

Also try

Set dbCustomer = CurrentDB
 

Users who are viewing this thread

Top Bottom