G
Guest
Hi all,
I have a form and a subform where the data from the form is automatically
entered into the subform by pressing a button with a code:
Me.SF_APV.Form.[ToFrom1] = Me.[ToFrom1]
(Which works all right.)
I want to make sure the button is pressed only after the data is entered
into the main form. So I want to make a warning window to appear if this
button is pressed while the field in the main form is empty.
I know nothing about programming and i looked for a similar questions in
this forum and found something like:
If IsNull(ToFrom1) Then
strMessage = strMessage & "No Name is Entered!" & vbCrLf
Else
Me.SF_APV.Form.[ToFrom1] = Me.[ToFrom1]
End If
I inserted this code into my button, but nothing happens, - i mean - no
warning appears and the field in the subform remains blank if it was blank on
the main form.
What am i doing wrong? Can somebody help me please?
Thank you.
Lana
I have a form and a subform where the data from the form is automatically
entered into the subform by pressing a button with a code:
Me.SF_APV.Form.[ToFrom1] = Me.[ToFrom1]
(Which works all right.)
I want to make sure the button is pressed only after the data is entered
into the main form. So I want to make a warning window to appear if this
button is pressed while the field in the main form is empty.
I know nothing about programming and i looked for a similar questions in
this forum and found something like:
If IsNull(ToFrom1) Then
strMessage = strMessage & "No Name is Entered!" & vbCrLf
Else
Me.SF_APV.Form.[ToFrom1] = Me.[ToFrom1]
End If
I inserted this code into my button, but nothing happens, - i mean - no
warning appears and the field in the subform remains blank if it was blank on
the main form.
What am i doing wrong? Can somebody help me please?
Thank you.
Lana