John,
I have been working on this error on just one computer that will not run only one piece of Code.
I eliminated all the codes under this button except this one line.
DoCmd.OpenForm "f_DentalRatesInput", WhereCondition:="ComCusID = " & Me.ComCusID
This runs on every computer with Access 2013 and 2016 except one which has Access 2013. The database is currently updated with 2016 but I believe that this piece of code was written in Access 2013.
It compiles fine.
Any thoughts? My next effort will be to upgrade that other machine to office 365.
Bill
Bill Singer
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, May 4, 2017 4:33 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] One computer error
Bill-
Try putting a halt in the code, open the form, select a value, and click the button. Then single-step line by line to see if it's even getting to that statement.
John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications
On May 4, 2017, at 22:50, 'Bill Singer' Bill.Singer@at-group.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
John,
Yes, I mean 2013. I did the debug and compile, it compiled OK, I saved the database. Still does not work. The button only had a problem when the one specific "case" is picked and only on that one machine.
Strange
Bill
Bill Singer
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, May 4, 2017 3:08 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] One computer error
Bill-
Ah, different version of Access. Open the database on that computer, open the VB Editor, and choose Debug / Compile. If it compiles OK, then click Save to save the compiled result.
It's not a good idea to try to run a database developed on one version on a machine with another version unless you make sure the code compiles OK on the target machine.
And do you mean Access 2013? There is no 2012 version.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On May 4, 2017, at 10:04 PM, 'Bill Singer' Bill.Singer@at-group.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
John, doesn't work means that nothing happens, no error message. I do get a statement at the bottom of the message that is a description of the first field on the form that is supposed to open.
I tried compact and repair and there was no change.
It is just on one computer, which is actually running Access 2012.
Thank you for your help.
Bill Singer
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, May 4, 2017 2:55 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] One computer error
Bill-
Please explain what you mean by "doesn't work". Does the form not open? Does it open but with an error?
Also, have you compiled and saved the code on the "not working" computer?
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On May 4, 2017, at 9:51 PM, 'Bill Singer' Bill.Singer@at-group.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I have Access 2016. I have a Front end running on 4 computers with a BE on one server.
On one of my main forms on the FE I have a button that had the following code (this is part of the code).
Private Sub Command30_Click()
DoCmd.RunCommand acCmdSaveRecord
Select Case Me.ComTypID
Case 8
DoCmd.OpenForm "f_HealthRatesInput", WhereCondition:="ComCusID = " & Me.ComCusID
Case 9
DoCmd.OpenForm "f_LifeRatesInput", WhereCondition:="ComCusID = " & Me.ComCusID
Case 10
DoCmd.OpenForm "f_STDRateInput", WhereCondition:="ComCusID = " & Me.ComCusID
Case 11
DoCmd.OpenForm "f_LTDRateInput", WhereCondition:="ComCusID = " & Me.ComCusID
Case 12
DoCmd.OpenForm "f_DentalRatesInput", WhereCondition:="ComCusID = " & Me.ComCusID
Case Else
MsgBox "Invalid Group Insurance Line"
End Select
End Sub
This works perfect on every computer except one. On one computer all of the options work except for
Case 12
DoCmd.OpenForm "f_DentalRatesInput", WhereCondition:="ComCusID = " & Me.ComCusID
Any idea as to why this would work on all the computers except one?
Thanks for your help.
Bill Singer
Minnesota
Posted by: "Bill Singer" <Bill.Singer@at-group.net>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (7) |
Tidak ada komentar:
Posting Komentar