Forms, Enter and edit data...? (1 Viewer)

Fulcrum

Registered User.
Local time
Today, 20:42
Joined
Aug 25, 2002
Messages
10
I have a form for entering Asset details into a Table, on this form there is a subform for delivery details relating to the particular asset.... How do I modify the form so I can edit / update a particular assets details.
ideally I would like to be able to switch the form to edit mode and just put in the asset number to bring up all the details aswell as any delivery details in the sub form.
I tried working with the example in the solutions database but got totally lost... Just aswell I dont do this for a living.

Thanks in advance for any help.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:42
Joined
Feb 28, 2001
Messages
27,241
In the subform there should be a property that allows you to link fields between the main and sub forms, where the option is something like link parent/child forms.

The idea being that if the detail records are in the subform, you can do things with them as long as the linkage between main and sub is properly handled. Then the only other issue is whether the subform has been designed to allow updating.

If you are having trouble, try this:

Make sure that the main data table and the details table have a rational relationship between them, one (main) to many (details).

Build the main form based on the main data table.

Build the sub form based on the details table.

The sub should clearly be smaller than the main because it will have to fit within the borders of the main.

Now MAKE SURE THE CONTROLS WIZARD IS ENABLED (it is the magic wand on the Form-Design toolbar) and create a subform on your main. Identify the subform you just created. The wizard will ask you if you want to link the sub to the main through a parent-child relationship. To which you will answer a resounding YES. Then just answer the questions about which field in the main corresponds to which field in the sub.

It shouldn't be harder than that.
 

Fulcrum

Registered User.
Local time
Today, 20:42
Joined
Aug 25, 2002
Messages
10
Thanks, I think the sub form bit is working ok my main problem is I can only "enter" data in the form.
What I am trying to do is make a form that I can switch between enter mode and edit mode..... for example, in edit mode I could select a particular asset No from a combo box and this would bring up that particular assets details in the form to edit.
At the moment I can only enter new asset details.
 

Fulcrum

Registered User.
Local time
Today, 20:42
Joined
Aug 25, 2002
Messages
10
Ok.. Thanks again,
I have added the combo box to the form header which shows the asset numbers .
When I select an asset number nothing happens, it just shows it in the text box part of the combo box.
How do I get it to bring up the asset details in the form for editing, also how do you switch modes, ie: enter to edit and back. Can I create enter/edit buttons to switch modes.

:confused:
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:42
Joined
Feb 19, 2002
Messages
43,374
The DataEntry property of the form needs to be set to No to allow you to use the form for editing. The No setting allows all three edit types - Add/change/delete.

Try deleting and re-adding your unbound "find" combo. Make sure the wizard is on. One of the options will be to find a record on the current form. You need to select that one.
 

Users who are viewing this thread

Top Bottom