D
Dale Brown
I have code that I am using to change the title bars description and the
application icon. I had this working at one time but I am on a new
machine. It is not working now. The code for the button to do this is
below. Any help would be appreciated.
On Error GoTo act_Error
Me.Recalc
GoTo act_Resume
act_Error:
MsgBox "Please complete this record before attempting to activate
this show."
Resume act_Resume
act_Resume:
On Error GoTo 0
DoCmd.SetWarnings False
DoCmd.RunSQL "delete * from activeshow"
DoCmd.RunSQL "insert into activeshow(showid) values (" & ShowID & ")"
Dim dbs As Database
Set dbs = CurrentDb
Dim rs As Recordset
Dim showDesc As String
showDesc = "GaitKeeper"
Set rs = dbs.OpenRecordset("select * from activeshowinfo")
If (Not rs.EOF And Not rs.BOF) Then
showDesc = showDesc & ": " & rs("showdescription")
End If
rs.Close
dbs.Properties("AppTitle") = showDesc
dbs.Properties("AppIcon") = "gkred.ico"
RefreshTitleBar
Dim frm As Form
Dim ex As Integer
For Each frm In Forms
If (Not frm.Name = "showSetup") Then
DoCmd.Close acForm, frm.Name
End If
Next frm
Dim rpt As Report
For Each rpt In Reports
DoCmd.Close acReport, rpt.Name
Next rpt
End Sub
application icon. I had this working at one time but I am on a new
machine. It is not working now. The code for the button to do this is
below. Any help would be appreciated.
On Error GoTo act_Error
Me.Recalc
GoTo act_Resume
act_Error:
MsgBox "Please complete this record before attempting to activate
this show."
Resume act_Resume
act_Resume:
On Error GoTo 0
DoCmd.SetWarnings False
DoCmd.RunSQL "delete * from activeshow"
DoCmd.RunSQL "insert into activeshow(showid) values (" & ShowID & ")"
Dim dbs As Database
Set dbs = CurrentDb
Dim rs As Recordset
Dim showDesc As String
showDesc = "GaitKeeper"
Set rs = dbs.OpenRecordset("select * from activeshowinfo")
If (Not rs.EOF And Not rs.BOF) Then
showDesc = showDesc & ": " & rs("showdescription")
End If
rs.Close
dbs.Properties("AppTitle") = showDesc
dbs.Properties("AppIcon") = "gkred.ico"
RefreshTitleBar
Dim frm As Form
Dim ex As Integer
For Each frm In Forms
If (Not frm.Name = "showSetup") Then
DoCmd.Close acForm, frm.Name
End If
Next frm
Dim rpt As Report
For Each rpt In Reports
DoCmd.Close acReport, rpt.Name
Next rpt
End Sub