Create New Record

BMS

New member
Local time
Tomorrow, 09:05
Joined
May 9, 2009
Messages
2
I have a relatively simple database which has grown considerably in size over the past few years. To reduce the size of the main table I have pulled out the memo field and placed that in a new table with the RecordID being the link between the two tables. (the second table is simple with two fields only RecordID and Memo (memo type field)

Not all records have a memo field. I've created a button on my main data entry form to display the memo contents where such exist. My problem is the link between the two tables will not allow me to add a new record (memo) in the linked table where one had not previously existed.

I have a "add new record" button created on the memo form but this does not work and will not add a new record.

How do force the insertion of the parent RecordID into the RecordID of the memo form to create a new linked record?

Thanks.
 
You need to do this through a query using the 2 tables then use that query for the record source of your form. Also is your memo field contained in a subform? Can't really greasp what you have done is there any possibility of attaching an example of the database (make a copy and delete the data if its sensitive)

regards John
 
I have two tables and two forms.

tblMembers has a number of fields and RECORD_ID.

tblMemo has two fields only, including RECORD_ID and a Memo

The two tbls are linked on RECORD_ID

NOT ALL records in tblMembers have a corresponding record in tblMemo. These need to be added as required.

I access all records from the Main form and when Memo information needs editing I simply hit the button than loads the associated form and displays linked on RECORD_ID Memo is displayed.

The problem is that when NO Memo EXISTS for a Members record a new Memo needs to be created. The Add Record button on the Memo Form returns an error Message. "Error in expression"

How do I "force" the linked RECORD_ID to be stored in the frm/tblMemo which at this point does not exist?

Simple for some - but not for me :-(
 
Because your structure is wrong if you link the tables in that way a memo must be created for each record instead of creating a memo when required thats why I asked if the memo was contained a subform...

The way you have your structure REQUIRES a memo to be generated... Give the memo table a Unique Id as well and use the recordID as a link to the table (foreign key) to display if a record exists.
 

Users who are viewing this thread

Back
Top Bottom