access 2000 problem

G

Guest

I have a main form which has the following:

* main form's record source is table Tab1.
* main form has an unbounded combo box (Combo1). Its row source is table Tab2
*main form has four subforms each based on a query and each using a Combo1
value criteria.
*main form has two unbounded text boxes Text1 and Text2. These are used to
display values from a table Tab3 if matching Combo1 is found in Tab3.
Otherwise
these display nothing. I use
Set rs = Me.Recordset.Clone
rs.FindFirst "[TRLG] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
type statement in code to find value in Tab3.

When Combo1 matching value is found in Tab3 my application works correctly.
However if no match is found then none of the subform fields show any values.
All I can see is the outline of subforms and field captions within these.
Please note that there is no link between Text1 / Text2 / Tab3 with any of
the subforms / queries and vice versa. The only thing in common is the Combo1
value. Also note that the queries linked to subforms definitely have atleast
one value corresponding to Comb1 value.

I want to application to show subforms field values even though Text1 &
Text2 have nothing to show (no match found in Tab3 for Combo1 value).

Any help.
 
M

MacDermott

The behavior you describe sounds like what you get when your form is based
on a recordsource which has no records, and to which no records can be
added.
So it doesn't sound surprising that you also get this effect if you set the
bookmark to something that doesn't exist.

You might consider an alternative approach:
Remove the recordsource of your main form.
Set the controlsource of your Text1 like this:
= DLookup("Field1","Tab1","[TRLG] = '" & Me![Combo35] & "'")
The controlsource of Text2 would look similar, but would reference a
different field in the table.

HTH
- Turtle
 
G

Guest

I had tried the solution that you describe but I still get the same behavior.

MacDermott said:
The behavior you describe sounds like what you get when your form is based
on a recordsource which has no records, and to which no records can be
added.
So it doesn't sound surprising that you also get this effect if you set the
bookmark to something that doesn't exist.

You might consider an alternative approach:
Remove the recordsource of your main form.
Set the controlsource of your Text1 like this:
= DLookup("Field1","Tab1","[TRLG] = '" & Me![Combo35] & "'")
The controlsource of Text2 would look similar, but would reference a
different field in the table.

HTH
- Turtle


Farooq Sheri said:
I have a main form which has the following:

* main form's record source is table Tab1.
* main form has an unbounded combo box (Combo1). Its row source is table Tab2
*main form has four subforms each based on a query and each using a Combo1
value criteria.
*main form has two unbounded text boxes Text1 and Text2. These are used to
display values from a table Tab3 if matching Combo1 is found in Tab3.
Otherwise
these display nothing. I use
Set rs = Me.Recordset.Clone
rs.FindFirst "[TRLG] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
type statement in code to find value in Tab3.

When Combo1 matching value is found in Tab3 my application works correctly.
However if no match is found then none of the subform fields show any values.
All I can see is the outline of subforms and field captions within these.
Please note that there is no link between Text1 / Text2 / Tab3 with any of
the subforms / queries and vice versa. The only thing in common is the Combo1
value. Also note that the queries linked to subforms definitely have atleast
one value corresponding to Comb1 value.

I want to application to show subforms field values even though Text1 &
Text2 have nothing to show (no match found in Tab3 for Combo1 value).

Any help.
 
M

MacDermott

What is the current recordsource of your main form?

Farooq Sheri said:
I had tried the solution that you describe but I still get the same behavior.

MacDermott said:
The behavior you describe sounds like what you get when your form is based
on a recordsource which has no records, and to which no records can be
added.
So it doesn't sound surprising that you also get this effect if you set the
bookmark to something that doesn't exist.

You might consider an alternative approach:
Remove the recordsource of your main form.
Set the controlsource of your Text1 like this:
= DLookup("Field1","Tab1","[TRLG] = '" & Me![Combo35] & "'")
The controlsource of Text2 would look similar, but would reference a
different field in the table.

HTH
- Turtle


Farooq Sheri said:
I have a main form which has the following:

* main form's record source is table Tab1.
* main form has an unbounded combo box (Combo1). Its row source is
table
Tab2
*main form has four subforms each based on a query and each using a Combo1
value criteria.
*main form has two unbounded text boxes Text1 and Text2. These are
used
to
display values from a table Tab3 if matching Combo1 is found in Tab3.
Otherwise
these display nothing. I use
Set rs = Me.Recordset.Clone
rs.FindFirst "[TRLG] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
type statement in code to find value in Tab3.

When Combo1 matching value is found in Tab3 my application works correctly.
However if no match is found then none of the subform fields show any values.
All I can see is the outline of subforms and field captions within these.
Please note that there is no link between Text1 / Text2 / Tab3 with any of
the subforms / queries and vice versa. The only thing in common is the Combo1
value. Also note that the queries linked to subforms definitely have atleast
one value corresponding to Comb1 value.

I want to application to show subforms field values even though Text1 &
Text2 have nothing to show (no match found in Tab3 for Combo1 value).

Any help.
 
G

Guest

The main form does not use any record source. Only the subforms do.

Farooq

MacDermott said:
What is the current recordsource of your main form?

Farooq Sheri said:
I had tried the solution that you describe but I still get the same behavior.

MacDermott said:
The behavior you describe sounds like what you get when your form is based
on a recordsource which has no records, and to which no records can be
added.
So it doesn't sound surprising that you also get this effect if you set the
bookmark to something that doesn't exist.

You might consider an alternative approach:
Remove the recordsource of your main form.
Set the controlsource of your Text1 like this:
= DLookup("Field1","Tab1","[TRLG] = '" & Me![Combo35] & "'")
The controlsource of Text2 would look similar, but would reference a
different field in the table.

HTH
- Turtle


I have a main form which has the following:

* main form's record source is table Tab1.
* main form has an unbounded combo box (Combo1). Its row source is table
Tab2
*main form has four subforms each based on a query and each using a
Combo1
value criteria.
*main form has two unbounded text boxes Text1 and Text2. These are used
to
display values from a table Tab3 if matching Combo1 is found in Tab3.
Otherwise
these display nothing. I use
Set rs = Me.Recordset.Clone
rs.FindFirst "[TRLG] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
type statement in code to find value in Tab3.

When Combo1 matching value is found in Tab3 my application works
correctly.
However if no match is found then none of the subform fields show any
values.
All I can see is the outline of subforms and field captions within these.
Please note that there is no link between Text1 / Text2 / Tab3 with any of
the subforms / queries and vice versa. The only thing in common is the
Combo1
value. Also note that the queries linked to subforms definitely have
atleast
one value corresponding to Comb1 value.

I want to application to show subforms field values even though Text1 &
Text2 have nothing to show (no match found in Tab3 for Combo1 value).

Any help.
 
M

MacDermott

Where is your code?
Behind the Main Form?
Behind one of the subforms?
What event triggers it?

- Turtle

Farooq Sheri said:
The main form does not use any record source. Only the subforms do.

Farooq

MacDermott said:
What is the current recordsource of your main form?

Farooq Sheri said:
I had tried the solution that you describe but I still get the same behavior.

:

The behavior you describe sounds like what you get when your form is based
on a recordsource which has no records, and to which no records can be
added.
So it doesn't sound surprising that you also get this effect if you
set
the
bookmark to something that doesn't exist.

You might consider an alternative approach:
Remove the recordsource of your main form.
Set the controlsource of your Text1 like this:
= DLookup("Field1","Tab1","[TRLG] = '" & Me![Combo35] & "'")
The controlsource of Text2 would look similar, but would reference a
different field in the table.

HTH
- Turtle


I have a main form which has the following:

* main form's record source is table Tab1.
* main form has an unbounded combo box (Combo1). Its row source
is
table
Tab2
*main form has four subforms each based on a query and each using a
Combo1
value criteria.
*main form has two unbounded text boxes Text1 and Text2. These
are
used
to
display values from a table Tab3 if matching Combo1 is found in Tab3.
Otherwise
these display nothing. I use
Set rs = Me.Recordset.Clone
rs.FindFirst "[TRLG] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
type statement in code to find value in Tab3.

When Combo1 matching value is found in Tab3 my application works
correctly.
However if no match is found then none of the subform fields show any
values.
All I can see is the outline of subforms and field captions within these.
Please note that there is no link between Text1 / Text2 / Tab3
with
any of
the subforms / queries and vice versa. The only thing in common is the
Combo1
value. Also note that the queries linked to subforms definitely have
atleast
one value corresponding to Comb1 value.

I want to application to show subforms field values even though
Text1
&
Text2 have nothing to show (no match found in Tab3 for Combo1 value).

Any help.
 
G

Guest

The code is behind the main form. Selecting a value from the combo box
(Combo1) triggers the event (AfterUpdate method).
MacDermott said:
Where is your code?
Behind the Main Form?
Behind one of the subforms?
What event triggers it?

- Turtle

Farooq Sheri said:
The main form does not use any record source. Only the subforms do.

Farooq

MacDermott said:
What is the current recordsource of your main form?

I had tried the solution that you describe but I still get the same
behavior.

:

The behavior you describe sounds like what you get when your form is
based
on a recordsource which has no records, and to which no records can be
added.
So it doesn't sound surprising that you also get this effect if you set
the
bookmark to something that doesn't exist.

You might consider an alternative approach:
Remove the recordsource of your main form.
Set the controlsource of your Text1 like this:
= DLookup("Field1","Tab1","[TRLG] = '" & Me![Combo35] & "'")
The controlsource of Text2 would look similar, but would reference a
different field in the table.

HTH
- Turtle


I have a main form which has the following:

* main form's record source is table Tab1.
* main form has an unbounded combo box (Combo1). Its row source is
table
Tab2
*main form has four subforms each based on a query and each using a
Combo1
value criteria.
*main form has two unbounded text boxes Text1 and Text2. These are
used
to
display values from a table Tab3 if matching Combo1 is found in
Tab3.
Otherwise
these display nothing. I use
Set rs = Me.Recordset.Clone
rs.FindFirst "[TRLG] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
type statement in code to find value in Tab3.

When Combo1 matching value is found in Tab3 my application works
correctly.
However if no match is found then none of the subform fields show any
values.
All I can see is the outline of subforms and field captions within
these.
Please note that there is no link between Text1 / Text2 / Tab3 with
any of
the subforms / queries and vice versa. The only thing in common is the
Combo1
value. Also note that the queries linked to subforms definitely have
atleast
one value corresponding to Comb1 value.

I want to application to show subforms field values even though Text1
&
Text2 have nothing to show (no match found in Tab3 for Combo1 value).

Any help.
 
M

MacDermott

I'm confused.
In one post, you say that your main form has no recordsource.
In another, you say that its recordsource is Tab1.
These can't both be true!

- Turtle

Farooq Sheri said:
The code is behind the main form. Selecting a value from the combo box
(Combo1) triggers the event (AfterUpdate method).
MacDermott said:
Where is your code?
Behind the Main Form?
Behind one of the subforms?
What event triggers it?

- Turtle

Farooq Sheri said:
The main form does not use any record source. Only the subforms do.

Farooq

:

What is the current recordsource of your main form?

I had tried the solution that you describe but I still get the same
behavior.

:

The behavior you describe sounds like what you get when your form is
based
on a recordsource which has no records, and to which no records
can
be
added.
So it doesn't sound surprising that you also get this effect if
you
set
the
bookmark to something that doesn't exist.

You might consider an alternative approach:
Remove the recordsource of your main form.
Set the controlsource of your Text1 like this:
= DLookup("Field1","Tab1","[TRLG] = '" & Me![Combo35] & "'")
The controlsource of Text2 would look similar, but would reference a
different field in the table.

HTH
- Turtle


I have a main form which has the following:

* main form's record source is table Tab1.
* main form has an unbounded combo box (Combo1). Its row
source
is
table
Tab2
*main form has four subforms each based on a query and each
using
a
Combo1
value criteria.
*main form has two unbounded text boxes Text1 and Text2.
These
are
used
to
display values from a table Tab3 if matching Combo1 is found in
Tab3.
Otherwise
these display nothing. I use
Set rs = Me.Recordset.Clone
rs.FindFirst "[TRLG] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
type statement in code to find value in Tab3.

When Combo1 matching value is found in Tab3 my application works
correctly.
However if no match is found then none of the subform fields
show
any
values.
All I can see is the outline of subforms and field captions within
these.
Please note that there is no link between Text1 / Text2 / Tab3 with
any of
the subforms / queries and vice versa. The only thing in
common is
the
Combo1
value. Also note that the queries linked to subforms
definitely
have
atleast
one value corresponding to Comb1 value.

I want to application to show subforms field values even
though
Text1
&
Text2 have nothing to show (no match found in Tab3 for Combo1 value).

Any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top