Keep messing up my forms, please help

NotVeryTechie

Registered User.
Local time
Today, 19:08
Joined
May 20, 2008
Messages
54
Hi there

I have been creating a form and I have added some buttons to it, but have not at this stage programmed them (still trying to figure out how). Anyway, everytime I change something on the form, like adding a button, the form stops working. Last time there was a bit of code left after I had tried to create a button. Not sure where to look for this though (someone else helped me).

How do I find and delete bits of code that are no longer required? Don't know how to use VB.

I really need help with this!
 
Last edited:
I really don't get what you're asking. How does it "stop working" when you add another button with no code behind it??

It's bizarro day today :)
 
When you add a button, the wizard adds code to your button only if you have set the wizard on and approve of the function it provides.

When you delete the button, what's left is a procedure call which points to nowhere.

Use alt-f11 to show the code window.

HTH:D
 
Thank you guys. twoplustwo - what I mean is that I can't add records, I can't change records. Right now it is showing one record instead of the 5 I have.

Guus2005 - I have opened the code window, but I don't know what to look for or what to delete. I have not experience using VB, so I am lost! :o
 
Do you remember the name you gave the buttons you deleted?

Look for those: Private Sub DeletedButtonName_Click() or something and remove all the text in that procedure.

Alternatively look at the names of exisiting controls and delete everything other sub in the form module.
 
Oh dear, I can't remember the names. I guess I could just delete all the buttons? Do I delete everything? Or do I leave the bit that says

Option Compare Database

End Sub

If I delete a button, why doesn't the code also get deleted? I don't understand how this works.

Thanks for the help so far!
 
If your code window shows this
Code:
Option Compare Database

End Sub
You've done something wrong. Remove the
Code:
End Sub
and compile your code: Menuitem Debug|Compile databasename

Enjoy!
 
Thank you so much guys. Unfortunately the forum won't allow me to give you more rep points, but you do deserve them!
 

Users who are viewing this thread

Back
Top Bottom