error “module not found”

  • Thread starter Thread starter swinden1
  • Start date Start date
S

swinden1

Guest
Hi, I have been creating a database over the past few weeks and I made some changes to some of the forms yesterday. Now when I click on the command buttons it gives me the error “module not found” this happens when I click on any on the next record or previous record command buttons I have tried deleting the buttons and recreating them but to no avail:eek: .
Does anyone have any suggestions?
Michael
 
Hi Michael

Have you created the buttons by using the wizard or have you written your own code behind these buttons? Have you checked the on click event property of the button to make sure the event is still being referenced?

Can you attach the entire code for your form and I will take a look at it for you and let me know which version of Access you are using. I remember something quite spurious happening with command buttons on version 2...but I am sure you have a later version than this.
 
Try compacting and repairing the database.
 
Hi Victoria,
I am using access 2003, I created the buttons using the wizard the code for the form is

Private Sub Command30_Click()
On Error GoTo Err_Command30_Click


DoCmd.GoToRecord , , acNext

Exit_Command30_Click:
Exit Sub

Err_Command30_Click:
MsgBox Err.Description
Resume Exit_Command30_Click

End Sub
Private Sub Command31_Click()
On Error GoTo Err_Command31_Click


DoCmd.GoToRecord , , acPrevious

Exit_Command31_Click:
Exit Sub

Err_Command31_Click:
MsgBox Err.Description
Resume Exit_Command31_Click

End Sub

On some command buttons I have got macros and these are working fine but for all the buttons the wizard has created I get the error “module not found”

Thanks
Michael
 
check your default values of textboxes or anything else that calls a function. did you delete any modules/functions in your code?
 

Users who are viewing this thread

Back
Top Bottom