Closing/Delete Record on Form

tafnuef1

Registered User.
Local time
Today, 10:56
Joined
Apr 22, 2010
Messages
43
When I click my control buttons to "Close Form" It clears my form but it takes me to click it 3-4 times before it closes. Everytime I click it it enables my first-fourth controls then it will finally close out. I also find if I simply click into any field it will enable it but I want them to stay unabled till the data is filled in for the previous form. I have it set that way but if I set focus by taking my mouse in pointing to a control it will start enabling some of my controls?? Does this make sense at all? Is there a place where I need to put my settings to keep it as it is when it refreshes till I am actually typing into the control???????? I want to finish this database and move on to getting reports out of the data but these little quirky things are making me nuts.

Below is my close form code I am using:


Private Sub Close_both_forms_Click()
On Error GoTo Err_Close_both_forms_Click
DoCmd.Close acForm, Me.Name, acSaveNo

Exit_Close_both_forms_Click:
Exit Sub
Err_Close_both_forms_Click:
MsgBox Err.Description
Resume Exit_Close_both_forms_Click

End Sub
 
Does this make sense at all?

Not really - it sounds as if you have multiple problems occuring simultaneously. Perhaps something you are doing when the form loads/unloads, opens/closes, etc., is causing all of the misdirection.

Strip the form down to its basic function with only the close button and see if it operates correctly. If so, add back in your control locking stuff and see how it goes.

-dK
 

Users who are viewing this thread

Back
Top Bottom