View Full Version : Enter New/Edit Data


jenvandiver
04-22-2003, 08:40 AM
Hello, I appreciate any help on this...

I have two tables, one for systems and one for system training plans (STRAP). Each system should have only one STRAP.

What I'd like to do is have the user enter new system information, followed by the STRAP information. Does everything need to be in one table for this, or one form? Instinctively, I want to separate them.

Right now, I have a form where the system data is entered. A button on that form takes them to another form where they choose the system from a combo box and then enter the STRAP information for that system. This form then leads them to another where they can review/confirm the STRAP data (which then gets entered directly into a Word document). My problem is that if they review the data on the third form and need to edit, how do I re-route them back to the original training plan record?

Currently, my STRAP form starts a new record with a new STRAP ID each time you enter it, rather than replacing the data in the original record. I would like to keep the system table and STRAP table separate if possible. Do I need two identical forms, one to enter new STRAPs and one to edit them? Would a query solve my problem?

Any help would be much appreciated!

Rob.Mills
04-22-2003, 08:45 AM
The big picture's a little fuzzy right now. You say there's only one Strap for each system. Do you have a one-to-many relationship between these. Do you also have referential integrity on.

If so, the user will need to enter info for Strap first to create and ID that can be used by the System form. You'll have to keep them on separate recordsets because if you try to combine them access will only let you update the many side table.

jenvandiver
04-22-2003, 08:51 AM
I think that's part of my problem. Right now, they're entering the system information first. Then by choosing their system, they enter the STRAP information. This works great for getting the data and saving it in one record in the table. My problem is going back around to edit the record, if necessary.

I can't create one-to-one relationships unless both IDs are primary and the same, but they are different so I'm stuck with one-to-many at this point, even though it's not working.

I could try to put everything into one table, I just don't want a long lengthy form for data entry. I may not have much choice, I guess.

Rob.Mills
04-22-2003, 08:56 AM
If it's a one-to-one I would combine it into one table unless it's absolutely necessary to separate them. You can get around the form challenge. A couple simple solutions is to setup a tab control to put different info on each tab. Another is pages in the form and using control buttons to navigate the pages. And yet another is to break them up into separate forms.

My personal favorite is the tab control. I think it's the simplest.

I just try to avoid one-to-one's because the coding is not worth it. It's not difficult coding but why bother, you know.

jenvandiver
04-22-2003, 08:59 AM
Yeah, I hear you. I'm not a coding whiz by far.

I'm working on merging the two tables now so I'll have one record for everything. I think it'll work fine - I'll just need to re-work my forms.

Thanks for the advice!