Jumat, 17 Mei 2013

[MS_AccessPros] Re: Event procedure does not work in compiled accde

 

Welcome Amanda! I'm glad to see you made it to our group.

The only thing I can think of is that the text box and/or the combo box is corrupt.

I'd make a backup copy and then decompile the mdb front end. Instructions for decompiling are here:
www.fmsinc.com/microsoftaccess/performance/decompile.asp

If that doesn't work, import everything into a new, blank database.

If that doesn't work you will have to create a new form. Don't copy and paste anything from the bad form or you will just be bringing over the corrupt pieces.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, "Amanda B" <amandabyrne@...> wrote:
>
> I recently converted to a split database due to errors we were encountering with multiple users. The backend resides on the server, and the front end accde file resides on local machines.
>
> The split database master file I used to create the front end does not report any errors with I use Debug>Compile in the VBA
>
> However, there is a key event procedure on one of the forms that does not function when I make the accde version of the database. It is a textbox named txtString. Users use this textbox to search records and populate a drop down based on the text entered, and thus populate the form.
>
> The code for the txtString AfterUpdate is:
>
> Private Sub txtString_AfterUpdate()
> 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
> End Sub
>
> The code for the related Combo SearchNames dropdown OnClick event is:
>
> Private Sub ComboSearchNames_Click()
> Me.RecordsetClone.FindFirst "[Animal ID] =" & Me.ComboSearchNames
> Me.Bookmark = Me.RecordsetClone.Bookmark
> Me.txtString = Null
> Form.Refresh
> Me.[ComboSearchNames].Requery
> End Sub
>
> The Combo SearchNames RowSource is a query defined in the RowSource property (i.e. there is not a separate 'dedicated' query that it calls)
>
> Why would this not work in the compiled version? T
>
> Gratefully, Amanda
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar