Topics Search

Adding a subform to an existing form

Adding a subform to an existing form
Views: 477
I am trying to add a subform to a form that has an Autonumber primary key. The table already has data in it.
In table view,(ie using no forms) the records are added and displayed correctly. When I use the existing form and the new subform to enter data, the auto increment number does not update on the foreign key field (Linked)on the subform. It seems to have a default value of a random number (28). I was trying to implement this on an existing form that never had a subform before.
Sponsored Links:

Similar posts...

 

Create a subform by using the Subform Wizard

Create a subform by using the Subform Wizard Icon
Want to add a subform to an existing form? The Subform Wizard will help you get the job done. You can use an existing form as the subform, or you can have Access create one for you. Watch this five-minute demo to learn how.
 

Filtering form to display a record only when there are data in the subform

Filtering form to display a record only when there are data in the subform Icon
I have a feeling I'm missing the blindingly obvious, but here goes:

I have a form with a subform that work fine together, and are used for comparing imported records (in the subform) against existing data (in the main form). However, sometimes there are nodata in the subform (ie no imported records matching an existing record), in which case I don't need to see the record in the main form at all.

In other words, I only want to see the existing records that might be affected by newly-imported data - only about 30% of the overall records.

Can I filter my main form to show only records that have one or more matches in the subform?
 

Subform Issue

Subform Issue Icon
To put it very simply, I have created a form with a subform. The only reason I am using a subform is because I have too many fields and I need a "scroll box" within a set of tabs. I have found no other way to do it.

This method works great except for one scenario: adding records.

I have about 15 fields that I need to display, so the 15 fields are on a subform. The form and subform both reference the same table. The form is linked to the subform on its AutoNumber.

the subform doesn't seem to be linking to the newly created record and I am getting errors when adding values.

The form I am concerned with is called "SAMPLE RECORD." You will see that if you open it, it works like I want it to, but if you click the + to add a newrecord, if you start typing data in the subform I quickly get errors when exiting.
 

How to alert user of data changed when adding or deleting record in SubForm?

How to alert user of data changed when adding or deleting record in SubForm? Icon
I have a MainForm containg a datasheet SubForm. I want Access to alert user when closing or leaving the record in the MainForm if there is any data change. adding or deletingrecord in datasheet SubForm is considered data change of existing MainForm record.

I applied Me.Dirty function in the Before Update in both MainForm and SubForm to trigger pop up message to alert users for any data change. However, Access does not consider adding or deleting records (rows) in the datasheet SubForm as data change. Therefore, the following codes do not apply.

Can anyone suggests how to make it work for user to be informed when they leave the MainForm if there is any record (row) in datasheet SubForm added or deleted?
 

unbound subform requery/new

unbound subform requery/new Icon
Have an unbound subform ; it is a continuous form; it is set for Data Entry in its form property.

when the main form first opens is well - the subform is blank; after the user populates some info into the subform - then I need to press a button on the main form and "refresh" the subform to a blank slate.

gotonew record just moves the record selector to the bottom new record - leaving the existing data showing.

other than closing the main form manually - and reopening - - I don't see a way to reset this subform.
 

Master & Child Link without subform

Master & Child Link without subform Icon
1st Is possible have Master & Child Link function without adding any subform? If yes, how?

Eg: When I selected a customer "ABC Inc" from a combolist (or many more than 1 field; eg this month,sales man A and etc), all transaction record from table tbltransaction will show me all transactions in a ~*SPLITFORM*~ according what I selected, when I adding new record in the form the table tbltransaction will automatic adding new record including selection(customer ABC Inc,sales man A and etc) I make which like how parent form and subform do between master link and child link.

I did not use subform for this because I unable to add Splitform in a subform,

I try to mimic splitform in 2 subforms(1 single form and 1 datasheet), I can synchronize between single view subform and datasheet subform, but I facing problem when I adding new record and delete record and other few small problems. as my problem is very simple so I hope I can mimic subform function in Splitform, so I do not need to write many VBA code for 2 subforms(1 single form and 1 datasheet) or maybe someone can teach me how to write the VBA code which allow me mimic splitform in 2 subform.
 

Form Subform DLookup

Form Subform DLookup Icon
I have a Form / Subform (with tabs)

On the Subform, I want to:
1. Sum values located on the Form to values located on the Subform.
2. Be able to add a new record for a subsequent Change Order.

The latest attempt has been to display the sum is:

[CODE]

It appears that the sum and the adding of a new record are mutually exclusive. Is my assumption correct?
 

Creating a "subform"

Creating a "subform" Icon
I have created a main form and did a drag and drop of another form that is related to it. I establishe the relationship as a one to many between the too. Now when I open the form the main form opens but the "subform" will not. I have tried different things including adding fake data but it still wont display. Can you advise me? I dont want to use the subform view I want to have it in form view
 

Sub-Forms and Sub-Reports

Sub-Forms and Sub-Reports Icon
A subform (or a subreport) is a form that placed in the body of an existing form (or report). The subform (or subreport) is usually made to show some records. The records of the subform (or subreport) must come from a table, a SQL expression, or a query.
 

Adding record to subform on exit of main form and no repeat record in subform

Adding record to subform on exit of main form and no repeat record in subform Icon
I want to add a record to a subform when save a record on the main form, additionally I want the subform to have no repeated record. ie. when people edit a record it wont add another record to the subform on exiting the main form.