form / subform issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi:

I've a MAIN and RESULTS forms.
I've a RESULTS query that deppend of a textbox inside MAIN form. this is the
criteria option in the query:

Like "*"+[Forms]![MAIN].[form]![textbox_x]+"*"

when doubleclick on the RESULTS form, the Enter Parameter Value appear wich
is normally due i need to put my searched word and the query works fine.
RESULTS form show those fields where the textbox_x value appear in the
database (field_2)

SELECT DATA.field_1, DATA.field_2
FROM DATA
WHERE (((DATA.field_2) Like
"*"+[Forms]![MAIN].[form]![textbox_x]+"*"));

My issue is that when i tried to open this form RESULTS like a subform of
MAIN, dont appear nothing and i dont know how can fix it.


Somebody can help me with this?

Regards
 
Refresh you subform in the afterupdate event of the text box on your main
form.


HTH
Katrina
 
Thanks, but how can i do it?

this is the code that i wrote:

Private Sub textbox_x_AfterUpdate()
If IsNull(textbox_x) Then
GoTo flag01
Else
subform.Visible = True
End If

flag01:
textbox_x.SetFocus


End Sub




Katrina said:
Refresh you subform in the afterupdate event of the text box on your main
form.


HTH
Katrina
Mr Doggo said:
Hi:

I've a MAIN and RESULTS forms.
I've a RESULTS query that deppend of a textbox inside MAIN form. this is the
criteria option in the query:

Like "*"+[Forms]![MAIN].[form]![textbox_x]+"*"

when doubleclick on the RESULTS form, the Enter Parameter Value appear wich
is normally due i need to put my searched word and the query works fine.
RESULTS form show those fields where the textbox_x value appear in the
database (field_2)

SELECT DATA.field_1, DATA.field_2
FROM DATA
WHERE (((DATA.field_2) Like
"*"+[Forms]![MAIN].[form]![textbox_x]+"*"));

My issue is that when i tried to open this form RESULTS like a subform of
MAIN, dont appear nothing and i dont know how can fix it.


Somebody can help me with this?

Regards
 
Private Sub textbox_x_AfterUpdate()
If IsNull(textbox_x) Then
GoTo flag01
Else
subform.requery
End If

flag01:
textbox_x.SetFocus

Katrina

Mr Doggo said:
Thanks, but how can i do it?

this is the code that i wrote:

Private Sub textbox_x_AfterUpdate()
If IsNull(textbox_x) Then
GoTo flag01
Else
subform.Visible = True
End If

flag01:
textbox_x.SetFocus


End Sub




Katrina said:
Refresh you subform in the afterupdate event of the text box on your main
form.


HTH
Katrina
Mr Doggo said:
Hi:

I've a MAIN and RESULTS forms.
I've a RESULTS query that deppend of a textbox inside MAIN form. this
is
the
criteria option in the query:

Like "*"+[Forms]![MAIN].[form]![textbox_x]+"*"

when doubleclick on the RESULTS form, the Enter Parameter Value appear wich
is normally due i need to put my searched word and the query works fine.
RESULTS form show those fields where the textbox_x value appear in the
database (field_2)

SELECT DATA.field_1, DATA.field_2
FROM DATA
WHERE (((DATA.field_2) Like
"*"+[Forms]![MAIN].[form]![textbox_x]+"*"));

My issue is that when i tried to open this form RESULTS like a subform of
MAIN, dont appear nothing and i dont know how can fix it.


Somebody can help me with this?

Regards
 
Back
Top