I posted a couple of weeks ago- we started having corruption problems
with our Access database, so I followed recommended procedures for
creating a front end file on the local pcs, and a table file on the
shared server.
The setup now consists of 3 files: a file on the server with the backend
of the database, a "master" file on the server that is still combined-
with forms and linked tables (linked to the same backend file, used to
make design changes), and a copy of a front end file on each user pc.
I'm continuing to have three problems since this split. All three
problems are not issues with the master file. The first is described
below (I'll write up the others in separate posts)
1. Search functionality on the primary search form is not working. It
did work temporarily, but we had a glitch. I restored a backup of the
file and modified it several times- each time the search worked fine in
the master, but failed in the front end file.
The search works with an Unbound text box to enter text for the search.
This box has an "AfterUpdate" event with the following code:
Private Sub txtString_AfterUpdate()
Me.ComboSearchNames.Requery
Dim strQuery As String
strQuery = "SELECT [Animal Records].[Animal ID], [Animal Records].[House
Name], [Animal Records].[Aliases] FROM [Animal Records] WHERE ([Animal
Records].[House Name] LIKE '*" & Me!txtString.Value & "*'OR [Animal
Records].[Aliases] LIKE '*" & Me!txtString.Value & "*') ORDER BY [Animal
Records].[House Name];"
Me!ComboSearchNames.RowSource = strQuery
Me!ComboSearchNames.Visible = True
Form.Refresh
End Sub
There is a Dropdown next to the Searchbox that populates with the
results of the search so the user can select the appropriate one.Private
Sub ComboSearchNames_AfterUpdate()
Me.Recordset.FindFirst "[Animal ID] =" & Me.ComboSearchNames
Form.Filter = "[Animal ID] =" & Me.ComboSearchNames
Form.FilterOn = True
Form.Refresh
Me.txtString = Null
End Sub
When using the front end file to access the database, the dropdown
populates correctly, but the form does not refresh to the appropiate
record. When using the Master file, the form goes to the correct record
just fine.
I have decompiled and recompiled, but this did not help.
Any suggestions about changes to the code that might work more
consistently?
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar