John,
that was a lot better.
I will have a follow up question tomorrow
Thank You
Jim Wagner
On Tuesday, March 21, 2017 07:12:48 AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Jim-
That's not substantially different. It still needs to be cleaned up like this:
Function SetValueStatusToDELETE()
On Error GoTo SetValueStatusToDELETE_Err
With CodeContextObject
DoCmd.SetWarnings False
If (.ACTION = "DELETED") Then
.status = "Deleted"
End If
If (.ACTION = "RECLASS") Then
.CurrentJobTitle.Visible = True
.CurrentJobCode.Visible = True
Else
.CurrentJobTitle.Visible = False
.CurrentJobCode.Visible = False
End If
End With
On Error GoTo SetValueStatusToDELETE_Err
With CodeContextObject
DoCmd.SetWarnings False
If (.ACTION = "DELETED") Then
.status = "Deleted"
End If
If (.ACTION = "RECLASS") Then
.CurrentJobTitle.Visible = True
.CurrentJobCode.Visible = True
Else
.CurrentJobTitle.Visible = False
.CurrentJobCode.Visible = False
End If
End With
DoCmd.SetWarnings True
SetValueStatusToDELETE_Exit:
Exit Function
SetValueStatusToDELETE_Err:
MsgBox Error$
Resume SetValueStatusToDELETE_Exit
End Function
SetValueStatusToDELETE_Exit:
Exit Function
SetValueStatusToDELETE_Err:
MsgBox Error$
Resume SetValueStatusToDELETE_Exit
End Function
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 Mar 21, 2017, at 9:35 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
sorry I copied it wrong
'------------------------------------------------------------
' Combined Macros
'
'------------------------------------------------------------
Function SetValueStatusToDELETE()
On Error GoTo SetValueStatusToDELETE_Err
With CodeContextObject
DoCmd.SetWarnings False
If (.ACTION = "DELETED") Then
.status = "Deleted"
End If
With CodeContextObject
If (.ACTION = "RECLASS") Then
.CurrentJobTitle.Visible = True
End If
If (.ACTION = "RECLASS") Then
.CurrentJobCode.Visible = True
End If
If (.ACTION <> "RECLASS") Then
.CurrentJobTitle.Visible = False
End If
If (.ACTION <> "RECLASS") Then
.CurrentJobCode.Visible = False
End If
End With
DoCmd.SetWarnings True
End With
SetValueStatusToDELETE_Exit:
Exit Function
SetValueStatusToDELETE_Err:
MsgBox Error$
Resume SetValueStatusToDELETE_Exit
End Function
' Combined Macros
'
'------------------------------------------------------------
Function SetValueStatusToDELETE()
On Error GoTo SetValueStatusToDELETE_Err
With CodeContextObject
DoCmd.SetWarnings False
If (.ACTION = "DELETED") Then
.status = "Deleted"
End If
With CodeContextObject
If (.ACTION = "RECLASS") Then
.CurrentJobTitle.Visible = True
End If
If (.ACTION = "RECLASS") Then
.CurrentJobCode.Visible = True
End If
If (.ACTION <> "RECLASS") Then
.CurrentJobTitle.Visible = False
End If
If (.ACTION <> "RECLASS") Then
.CurrentJobCode.Visible = False
End If
End With
DoCmd.SetWarnings True
End With
SetValueStatusToDELETE_Exit:
Exit Function
SetValueStatusToDELETE_Err:
MsgBox Error$
Resume SetValueStatusToDELETE_Exit
End Function
Jim Wagner
On Tuesday, March 21, 2017 06:15:51 AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
It looks like the code conversion has embedded the second macro in the first. It needs to be cleaned up:
You don't need the second function.
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 Mar 21, 2017, at 8:22 PM, luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
__._,_.___
Posted by: Jim Wagner <luvmymelody@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar