Prompted to Save table within form upon exit

mhermher

New member
Local time
Yesterday, 21:41
Joined
Sep 19, 2009
Messages
8
Hi,

I have a form that has a project table as its control (key = project #). There is a table within the form tied to the products table (key = product #). The table's "project #" column is linked to the forms primary key (project #).

Upon exiting the form, or even when switching to design view, I get a prompt which asks me if I want to save changes to the table, even if no changes were made.

Whether I choose yes or no, I still get the same prompt everytime, and as far as I can see, the table has no changed.

I suspect the reason for this is because the "on load" event for the form is to disable the table. It can later be enabled by some other actions within the form.

Is there any way to get rid of this prompt? Is there a different way to structure what I want to do that would avoid this problem.

It's annoying, but also I want to use it as a run time application, and this prompt will not make any sense to anyone else using it.

Any help will be appreciated, thanks.
 
Can you post your database? I think you probably have something there that shouldn't be there but I'm not sure what without seeing it.
 
Ah man, the file is on my work computer and I am home for the weekend. I can run in real quick tomorrow, and I'll post it at that time. Thanks, please check back tomorrow afternoon.
 
Ok, Here. I have an older version of the file and I recreated the problem. It was, as I suspected, caused by the "on load" procedure of the form. Here, I am attaching it. The form is called "New Order". Let me know what you find.
 

Attachments

Please, when attaching a database, note that it is in Access 2007 format, so that members who do not run this version don't waste time downloading and unzipping it.

Thanks
 
Please, when attaching a database, note that it is in Access 2007 format, so that members who do not run this version don't waste time downloading and unzipping it.

Thanks
 
Okay, the real problem is due to your use of the code disabling the subform when the form loads. But, I also redid your database to be more properly designed (don't use special characters in field or object names and spaces are also not recommended). Also, I did change most of the keys to be autonumber (the ones you had as text are not the best and as the keys are only for use of the system, it shouldn't matter what they are but the best, I've found, is to use a surrogate key - autonumber - as it will not change the rules on you into the game. In other words, if you have a product number, sometimes some other vendor might just happen to have the same exact product number and then you have to deal with that.

So, see the attached.
 

Attachments

Thanks for the tips about the design. I think I will implement those ideas. Do you have any suggestions as to the subform disabling issue? Thanks.

I am also attaching a new zip file which includes the file with older file extensions, in case anyone else wants to help. Sorry I did not know the etiquette as far as that goes.
 

Attachments

You could try using the Visible property of the subform to make it visible when something is filled in instead of being enabled. It may solve the problem. I did this with one client's database a year or two ago.
 

Users who are viewing this thread

Back
Top Bottom