Subform Question

D

Debbiedo

I have a main table (Lets call it "MainTable") that is linked to a
server that I do not have write access to. I want to supplement this
data with my own table (Let's call it "SubTable"), joining these two
tables by a common unique ID. All the data is to be included on a
single form. The main form contains the data from the linked table,
the subform will be the data I need to enter in the form based on what
is displayed in the main form.

Data from the main form is constantly updated and I have view to
access this data. I want to enter supplemental data using the subform
while displaying the data from the MainTable in the main form.

I have created the two forms and embedded and synchonized the subform
into the main form but the way I set it up, only those records that
have matching unique ID's show up in the form. New data entered in the
MainTable does not show up, only the data for which I have already
added supplimental data shows up. What I am trying to do is have the
form show two things:

1) If both tables have the matching unique IDs, show the data from
both tables.
2) If the main form has a record that is not matched to the unique ID
of the subform, update the unique ID in the SubTable with the
MainTable's unique ID so I can enter the supplemental data in the
subform interface.

This seems to be what is happening in the Northwind database. I added
a new record in the Orders table, in the table view. I was able to see
the new record in the Orders form and enter new data in the Orders
Subform. The data I entered using the Orders Subform somehow got
updated into the Order Details table while I was using the Orders
form. I cannot figure out how this was done.

Ideas anyone?
 
R

Roger Carlson

Is the UniqueID in the SubTable also a PrimaryKey?

As far as I can see, this SHOULD be working, although I have never set up
something exactly like this. The subform control should fill in the foreign
key field (which in your case is also the primary key). Perhaps if the main
table is read-only, so is the subform. It doesn't seem like it should be.

Make sure the subform (or the recordset behind it) is updateable.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

What is the datatype for your Unique ID in both the MainTable and the
SubTable?

--
--Roger Carlson
MS Access MVP
Access Database Samples:www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L











- Show quoted text -

They are both text fields. Exact same properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top