Datasheet view alignment after filtering on subform

H

Hiro

Hello Forum Members:

I am using Access 2000 and the sub form on the main form is displayed as
datasheet view. When the filtered results are opened, the datasheet view
alignment is changed somewhat. Before filtering, the entire datasheet view is
full-filled in sub form. And after filtering, I see space on the far right
side of the sub form. Do anyone know how I can correct this problem?

Here is the code for the filter, but the filtered results are correct, so I
am not sure if this is related to the code. Is it something that I need to
adjust on the property of the main form and sub form?

{code}
Private Sub cmdFilter_Click()
Dim strWhere As String
Dim lngLen As Long
If Not IsNull(Me.FindWord) Then
strWhere = strWhere & "([English] Like ""*" & Me.FindWord & "*"")
AND "
End If
lngLen = Len(strWhere) - 5
If lngLen <= 0 Then
MsgBox "Nothing is specified.", vbInformation, "Nothing to show."
Else
strWhere = Left$(strWhere, lngLen)
Me.Child19.Form.Filter = "[English] Like '*" & Me.FindWord & "*'"
Me.Child19.Form.FilterOn = True
End If
End Sub
{/code}
 
P

PINK*PASSION

Hiro said:
Hello Forum Members:

I am using Access 2000 and the sub form on the main form is displayed as
datasheet view. When the filtered results are opened, the datasheet view
alignment is changed somewhat. Before filtering, the entire datasheet view
is
full-filled in sub form. And after filtering, I see space on the far right
side of the sub form. Do anyone know how I can correct this problem?

Here is the code for the filter, but the filtered results are correct, so
I
am not sure if this is related to the code. Is it something that I need to
adjust on the property of the main form and sub form?

{code}
Private Sub cmdFilter_Click()
Dim strWhere As String
Dim lngLen As Long
If Not IsNull(Me.FindWord) Then
strWhere = strWhere & "([English] Like ""*" & Me.FindWord & "*"")
AND "
End If
lngLen = Len(strWhere) - 5
If lngLen <= 0 Then
MsgBox "Nothing is specified.", vbInformation, "Nothing to show."
Else
strWhere = Left$(strWhere, lngLen)
Me.Child19.Form.Filter = "[English] Like '*" & Me.FindWord & "*'"
Me.Child19.Form.FilterOn = True
End If
End Sub
{/code}
 
J

Jeanette Cunningham

Hiro,
this sounds quite unusual.
After filtering, are all the columns the same width as before the filter?
After filtering, are all the columns visible?
After filtering, is there something different with the scrollbar?
What is the link master and child field between the parent and child form?
In design view of the main form if you select Child19 and size it to fit
using Format | Size | To Fit does this make any difference?
Are both parent and child bound to the same query or table?
Do you have all the recommended service packs applied to Access 2000?
Have a look at this page about filtering bugs
http://www.allenbrowne.com/bug-02.html


Jeanette Cunningham
 
H

Hiro

Hello Jeanette:

Thank you for looking into this thread. This is what I have noticed.
Before filtering, the entire records are approximately 10,000 entries.
After filtering based on the words that I search:
* if the filtered results are just a few (5 or 6 that are within the sub
form size), then the datasheet view does not show the scroll bar where I had
previously mentioned as some space.
* If the filtered results are many, then the datasheet view shows the
scrollbar on the right side.

So, it seems that the scrollbar shows up or does not show up depending upon
the filtered results (how many) due to the size of the sub form.
This is just how the datasheet view works, doesn't it?

With best regards,
Hiro Shiratori

Jeanette Cunningham said:
Hiro,
this sounds quite unusual.
After filtering, are all the columns the same width as before the filter?
After filtering, are all the columns visible?
After filtering, is there something different with the scrollbar?
What is the link master and child field between the parent and child form?
In design view of the main form if you select Child19 and size it to fit
using Format | Size | To Fit does this make any difference?
Are both parent and child bound to the same query or table?
Do you have all the recommended service packs applied to Access 2000?
Have a look at this page about filtering bugs
http://www.allenbrowne.com/bug-02.html


Jeanette Cunningham


Hiro said:
Hello Forum Members:

I am using Access 2000 and the sub form on the main form is displayed as
datasheet view. When the filtered results are opened, the datasheet view
alignment is changed somewhat. Before filtering, the entire datasheet view
is
full-filled in sub form. And after filtering, I see space on the far right
side of the sub form. Do anyone know how I can correct this problem?

Here is the code for the filter, but the filtered results are correct, so
I
am not sure if this is related to the code. Is it something that I need to
adjust on the property of the main form and sub form?

{code}
Private Sub cmdFilter_Click()
Dim strWhere As String
Dim lngLen As Long
If Not IsNull(Me.FindWord) Then
strWhere = strWhere & "([English] Like ""*" & Me.FindWord & "*"")
AND "
End If
lngLen = Len(strWhere) - 5
If lngLen <= 0 Then
MsgBox "Nothing is specified.", vbInformation, "Nothing to show."
Else
strWhere = Left$(strWhere, lngLen)
Me.Child19.Form.Filter = "[English] Like '*" & Me.FindWord & "*'"
Me.Child19.Form.FilterOn = True
End If
End Sub
{/code}
 

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