Enter new record in a filtered form

Steven811

Registered User.
Local time
Today, 10:41
Joined
Apr 18, 2004
Messages
133
Hi

I want a filtered pop up form to accept new records.

The archive posting that I found suggested that I insert

[MyForm]![LinkedField] as the default value of the linked field.

Any suggestions gratefully accepted.

Steven811
 
Error message

Hi Pat

I inserted [Me.ContactKey=Forms!subformContacts2!ContactKey]

in the BeforeInsert section of the properties for the active (pop up) form

and I get the following message: The expression Before Insert you entered as the event prperty setting produced the following error: The object doesn't contain the automation object 'Me.'

Forgive me for being a simpleton.
 
Don't receive the error message anymore

Hi

I've been looking at it again and I've put it as a line of code in the event procedure of Before Insert, the error messages have stopped although it doesn't carry the value into the foreign key field, that's a zero. Consequently I have no reference to link the data.

Err.

The code is:

[Private Sub Form_BeforeInsert(Cancel As Integer)
Me.ContactKey = Forms!forProject2!ContactKey
End Sub]

forProject2 is a sub form
 

Users who are viewing this thread

Back
Top Bottom