Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to build a form on top of fifth-normal-form structure

Status
Not open for further replies.

trs79

Programmer
Jun 14, 2005
14
US
Hi,

I have built a db structure in fifth-normal-form, and as such a query to retrieve the right values has to do a cross-multiply (cartesian product) on the tables. This prevents me from creating an updatable query.

However, I am building a form and want the user to be able to add new records, delete, edit, etc. I set the form to be "dynaset inconsistent updates", which allows Access to display the * new record field. I have set up some code on the beforeUpdate event to do the manual inserting of the right data, but the problem is Access doesn't know that I have done the insert. It tries to add the data itself and of course throws an error. Can I 'trick' access into not doing anything with the data? Thanks!
 
since "have set up some code on the beforeUpdate event to do the manual inserting of the right data"

use an unbound form.
 
I think I see what you mean, but how would you display records that had already been entered if the form was unbound? Thanks!
 
There are several possible techniques. Have you considered binding when you want to view the data and unbinding when you want to enter data. Seperate froms for each operation is another possibility.
 
I like the sound of dynamic binding/unbinding. Can you dynamically unbind from code, and if so, would the values that were already displayed still stay there? I really appreciate the help. I have also toyed with the idea of using a temp table.
 
look at the me.recordsource property

Yes you can set this via code. It will refresh each time you change it. To move back to the previous value you would need to keep that somewhere and move back to that record when you rebind.

 
I tried setting the recorsource property to "" and all of my rows disappeared from the form (refreshed as you mentioned). If I change the recordsource back the rows show up again. Is it possible to keep the rows there some how even when the form is unbound? I'm guessing no, but I thought I would ask, thanks.

 
Based on what Ive read I assume you are using a continious form. If you set the the recordsource to "" then the rows are going to disappear. The way to keep the rows there and not have them bound it to load them into a control. a listbox or a listview or flexgrid are just a few of your options.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top