Filtering a subform

G

Guest

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?
 
G

Guest

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table
 
G

Guest

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

Ofer said:
This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?
 
G

Guest

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

Ofer said:
This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

So just put the code into a button and then click it after I make my
selections?

Ofer said:
Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

Ofer said:
This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
So just put the code into a button and then click it after I make my
selections?

Ofer said:
Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

Ofer said:
Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
So just put the code into a button and then click it after I make my
selections?

Ofer said:
Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

Ofer said:
Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Or, if you want to get all the values if nothing was selected in the combo, try

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] Like (" & Nz(Me![A],
"'*'") & ") And [BB] Like (" & Nz(Me.B, "'*'") & ")"

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

Ofer said:
Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Ok I tried it but I'm getting an error message that says "Data type mismatch
in critieria expression". Here is the code, let me know if I did something
wrong. Also the reason why I wanted to do this by one box instead of two is
because the first combo box will locate all the records with a specific
filter and then I want to use the second combo box to seek out a specific
record in that filter. And then I want to be able to scroll through the list
even after I make my second selection.

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
" & Me![RawDiameter]
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark



Ofer said:
Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

Ofer said:
Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


:

So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

If the field type is string, try adding a single quote before and after

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
'" & Me![RawDiameter] & "'"


--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Ok I tried it but I'm getting an error message that says "Data type mismatch
in critieria expression". Here is the code, let me know if I did something
wrong. Also the reason why I wanted to do this by one box instead of two is
because the first combo box will locate all the records with a specific
filter and then I want to use the second combo box to seek out a specific
record in that filter. And then I want to be able to scroll through the list
even after I make my second selection.

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
" & Me![RawDiameter]
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark



Ofer said:
Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

:

Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


:

So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Still getting the error message after I added the quotes. The field type is
"text" if that's what you mean.

Ofer said:
If the field type is string, try adding a single quote before and after

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
'" & Me![RawDiameter] & "'"


--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Ok I tried it but I'm getting an error message that says "Data type mismatch
in critieria expression". Here is the code, let me know if I did something
wrong. Also the reason why I wanted to do this by one box instead of two is
because the first combo box will locate all the records with a specific
filter and then I want to use the second combo box to seek out a specific
record in that filter. And then I want to be able to scroll through the list
even after I make my second selection.

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
" & Me![RawDiameter]
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark



Ofer said:
Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


:

Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

:

Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


:

So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Can you post your code please?

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Still getting the error message after I added the quotes. The field type is
"text" if that's what you mean.

Ofer said:
If the field type is string, try adding a single quote before and after

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
'" & Me![RawDiameter] & "'"


--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Ok I tried it but I'm getting an error message that says "Data type mismatch
in critieria expression". Here is the code, let me know if I did something
wrong. Also the reason why I wanted to do this by one box instead of two is
because the first combo box will locate all the records with a specific
filter and then I want to use the second combo box to seek out a specific
record in that filter. And then I want to be able to scroll through the list
even after I make my second selection.

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
" & Me![RawDiameter]
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark



:

Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


:

Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

:

Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


:

So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Here it is:

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] = " &
Me![RawDiameter] & ""
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark

Ofer said:
Can you post your code please?

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Still getting the error message after I added the quotes. The field type is
"text" if that's what you mean.

Ofer said:
If the field type is string, try adding a single quote before and after

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
'" & Me![RawDiameter] & "'"


--
\\// Live Long and Prosper \\//
BS"D


:

Ok I tried it but I'm getting an error message that says "Data type mismatch
in critieria expression". Here is the code, let me know if I did something
wrong. Also the reason why I wanted to do this by one box instead of two is
because the first combo box will locate all the records with a specific
filter and then I want to use the second combo box to seek out a specific
record in that filter. And then I want to be able to scroll through the list
even after I make my second selection.

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
" & Me![RawDiameter]
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark



:

Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


:

Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

:

Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


:

So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Try this

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] = '" &
Me![RawDiameter] & "'"
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Here it is:

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] = " &
Me![RawDiameter] & ""
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark

Ofer said:
Can you post your code please?

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Still getting the error message after I added the quotes. The field type is
"text" if that's what you mean.

:

If the field type is string, try adding a single quote before and after

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
'" & Me![RawDiameter] & "'"


--
\\// Live Long and Prosper \\//
BS"D


:

Ok I tried it but I'm getting an error message that says "Data type mismatch
in critieria expression". Here is the code, let me know if I did something
wrong. Also the reason why I wanted to do this by one box instead of two is
because the first combo box will locate all the records with a specific
filter and then I want to use the second combo box to seek out a specific
record in that filter. And then I want to be able to scroll through the list
even after I make my second selection.

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
" & Me![RawDiameter]
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark



:

Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


:

Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

:

Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


:

So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 
G

Guest

Well I didn't get any error messages but nothing is happening when I click
the button. I make my selection from the first combo box and then the list
appears. Then I choose my selection from the second combo box and it filters
only those records. Then I click on the button and everything stays the same.
Since the lsit appears when I choose the first combo box can we just turn the
second combo box into a "selection" criteria instead of a filter? Just have
it jump to a starting record instead of filtering it?

Ofer said:
Try this

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] = '" &
Me![RawDiameter] & "'"
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
Here it is:

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] = " &
Me![RawDiameter] & ""
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark

Ofer said:
Can you post your code please?

--
\\// Live Long and Prosper \\//
BS"D


:

Still getting the error message after I added the quotes. The field type is
"text" if that's what you mean.

:

If the field type is string, try adding a single quote before and after

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
'" & Me![RawDiameter] & "'"


--
\\// Live Long and Prosper \\//
BS"D


:

Ok I tried it but I'm getting an error message that says "Data type mismatch
in critieria expression". Here is the code, let me know if I did something
wrong. Also the reason why I wanted to do this by one box instead of two is
because the first combo box will locate all the records with a specific
filter and then I want to use the second combo box to seek out a specific
record in that filter. And then I want to be able to scroll through the list
even after I make my second selection.

Me.tblClassB_subform2.Form.RecordsetClone.FindFirst "[RawDiameter] =
" & Me![RawDiameter]
Me.tblClassB_subform2.Form.Bookmark =
Me.tblClassB_subform2.Form.RecordsetClone.Bookmark



:

Remove one filter, from

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]

To
Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A]

--
\\// Live Long and Prosper \\//
BS"D


:

Ok but what if I only want to use the one combo box? How do I change that
sample code for just one combo box?

:

Yes, but change the name of the sub form and fields

--
\\// Live Long and Prosper \\//
BS"D


:

So just put the code into a button and then click it after I make my
selections?

:

Create a button next to the combo's on the main form, and run the code after
the two combo's are filled.
the sub form can be any view you would like.

--
\\// Live Long and Prosper \\//
BS"D


:

Where do I put this code?Also, do I set the subform to "Continuous Form" so
it will have the ability to scroll?

:

This code example, will use the values in the two combo's to move to the record

Me.SubFormName.Form.RecordsetClone.FindFirst "[AA] = " & Me![A] & " And [BB]
= " & Me.B
Me.SubFormName.Form.Bookmark = Me.SubFormName.Form.RecordsetClone.Bookmark
===========================================
A and B stand for the name in the combo's
AA and BB stand for name of the fields in the table

--
\\// Live Long and Prosper \\//
BS"D


:

I'm not sure that will work for my form. I have a form with 2 combo boxes and
a subform used for filtering. When I choose options from the 2 combo boxes it
will list multiple records at once in the subform. What I need now is to have
it list all my records in that table and then when I select the choices have
it just go to the starting record of the choices. All the while still
allowing me to scroll up and down through all the records in that table, not
just the ones I chose. Does this make sense?

:

Look at this sample, where the user can enter a text to search on, so instead
of filtering the records, the record move to the desire location, and you
still have the ability to move between records

http://www.databasedev.co.uk/text_search.html

All you need is to replace the text box with the combo

--
\\// Live Long and Prosper \\//
BS"D


:

I have a subform that is filtered by 2 combo boxes on my main form. What I
want to do is use the two combo boxes but instead of filtering with the
second combo box, just have it go to a certain record. This will allow the
user to still scroll through the all the other records if needed. So for
example if I had 100 records I could use the second combo box to "go to"
record 25 but still be able to scroll up and down through all the other
records. How would I incorporate this into my exiting form?
 

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