Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AddNew buttom not work

Status
Not open for further replies.

site

Programmer
Oct 23, 2001
44
AT
Hi, All,

I have a Access project, and connect to SQL server.
In the form I create "Add New" buttom, but doesn't work.

The following are my codes:

Sub AddNew_Click()
On Error GOTO Err_AddNew_Click

Dim strDocName As String
strDocName = "frmComplaints"
Docmd.OpenForm strDocName, , , , acAdd

ExitAddNew_Click:
Exit Sub

Err_AddNew_Click:
Msgbox Err.Description
Resume Exit_AddNew_Click

End Sub

Hope help.

Thanks a lot.
Jing
 
What message do you get when you try to run this function?

Have you actually assigned the code to the command button so that when it is clicked it actuates this code?? James Goodman
j.goodman00@btinternet.com
 
Hi, James,

When I click this buttom, nothing come out. What's wrong??

Thank you very much for your advance.
Jing
 
where you have the text acadd, this needs to change to acaddnewrec!! (if it doesn't work, email me!!)

craig@chyld.co.uk

I wasn't embarrassed by tripping and falling face first, but rather that I forgot to tie my laces in the first place.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top