Access won't let me save form

revver

Active Member
Joined
Dec 20, 2007
Messages
257
In my .mdb database I have a continuous form whose record source is
Code:
SELECT Contact.ContactID, Contact.FirstName, Contact.LastName, Contact.PreferredSalutation,
       Contact.emailAddr, Contact.Celphone, Contact.IsActive, Contact.IsChosen
FROM Contact
WHERE (((Contact.emailAddr) Is Not Null) AND ((Contact.IsActive)=True))
ORDER BY Contact.FirstName;
It displays fine. Now I want to add a [Continue] button and have it load another form which will ask for parameters.

When I use the wizard to add the new button everything appears to work. However, when I now try to save the form I am told to set property HasModule to No before I can save.
This form contains changes that are incompatible with the current db format. The form was not saved.
In order to save your changes you must remove any layouts that have empty cells in them and/or set the HasModule property to No
WHAT does the standard wizard code to load a new form have that is upsetting access 2010? Here is the wizard's code and
even with the do-the-job lines REMed out, the error persists.

Code:
Private Sub cmdMore_Click()
On Error GoTo Err_cmdMore_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    'stDocName = "frmBlastType"
    'DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdMore_Click:
    Exit Sub

Err_cmdMore_Click:
    MsgBox Err.Description
    Resume Exit_cmdMore_Click
    
End Sub
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
What happens if you put in the button without using the wizard?
 
Upvote 0
Hi Xenou
A button by itself is ok providing the form has no module.
Just having an empty Sub/End Sub is enough to cause this failure.

From the words of the error message I have reasoned that there must be a conflict between a module and a(n empty) layout cell. I haven't heard of layout cells so I went looking to find out. I still do not know what they are but I found out how to tell if I have any.

Right clicking on a control on the form gives the usual pop-up menu. In the list of options is one called Layout with 3 sub-options (Tabular, Stacked, Remove Layout). Remove Layout was dimmed out in all fields in the Detail Section but it wasn't dimmed for one control in the Form Header - the main header. The header labels naming the fields appearing below them in the Detail Section were layout free. I clicked on Remove Layout for the offending control - saving succeeded. Then I added code to the button and saved again - success. Clicking the button loads the parameter form properly. Problem solved.

I still do not know what a layout is and I intend to find out sometime when I recover from the delays of this road bump.
 
Upvote 0
Okay. Not sure either - I haven't really got up to speed on Access 2010, and now 2013 is out so I'll just skip 2010 ;) . Access has grown a lot - you have the old desktop program we know and love, but now there are features designed for use with sharepoint apps, web apps in the cloud - and development features that point in the directions of Access macros rather than VBA macros, as a security feature.
 
Upvote 0

Forum statistics

Threads
1,221,527
Messages
6,160,342
Members
451,638
Latest member
MyFlower

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top