Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with new records in subform

CSDunn
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello,

In an Access 2003 Project, I have a main form called
‘frmRCAddendumInputMain' that contains a subform called
‘frmRCAddendumInputSub'. The main form opens upon clicking a button
from another form called ‘frmRCMain'. In frmRCAddendumInputMain, there
is an unbound text box called ‘PassPermnum' that gets its value from a
field called ‘Permnum' on frmRCMain. The calculation in ‘PassPermnum'
is as follows;

=[Forms]![frmRCMain]![Permnum]

There is no ‘RecordSource' for frmRCAddendumInputMain. The record
source for frmRCAddendumInputSub is a SQL Server 2000 View. The Link
Master field is ‘PassPermnum' and the Link Child Field is called
‘ADPermnum'. You can think of ‘Permnum' as a student ID.

The View that is the Record Source for frmRCAddendumInputSub contains
fields from two SQL Server 2000 tables. One table is called
‘Student_Data_Main' and the other table is called ‘tblRCAddendumEL'.
The Unique Table in frmRCAddendumInputSub is ‘tblRCAddendumEL'.
‘ADPermnum' is in ‘tblRCAddendumEL'.

When frmRCAddendumInputMain opens, ‘PassPermnum' in the main form
contains the correct value, but none of the student information that I
would expect to see based on the value of the child field appears in
frmRCAddendumInputSub until I enter data into one of the unique table
fields located on frmRCAddendumInputSub. When I enter data, the
associated student information suddenly appears, but the data that I
entered into the field ‘goes away', and I have to enter the data
again. This only happens when frmRCAddendumInputMain opens, and there
is not a related child record in the subform.

How can I have frmRCAddendumInputMain behave in such a way that when
it opens, a matching record can be created if one does not already
exist in the subform without having to enter data in one of the unique
table fields first? Or, when I enter data into a single unique table
field in the subform, how can I avoid having the entry ‘go away' after
the student information appears?

Thank you for your help!

CSDunn

Closed Thread