A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form Opening



 
 
Thread Tools Display Modes
  #1  
Old January 13th, 2009, 10:59 PM posted to microsoft.public.access.forms
disneygoof via AccessMonster.com
external usenet poster
 
Posts: 57
Default Form Opening

I love this site....if I haven't mentioned that before...

I have another STRANGE issues. I have a form 'A' and subform 'B' (continuous
layout). I have buttons on the subform that open another form 'C' and set
the seconf form to the PROJECTID of the subform...works fine.

I added a button to the first form 'A' to filter on a specifc column:
Private Sub AllProjects_Click()

If Me.FilterOn = True Then
Me.Filter = ""
Me.FilterOn = False
Me.AllProjects.Caption = "Show My Projects"
Me.AllProjects.ForeColor = vbBlue
Me.Refresh
Else
Me.Filter = "[LoginUsername] = '" & GetUserName() & "'"
Me.FilterOn = True
Me.AllProjects.Caption = "Show All Projects"
Me.AllProjects.ForeColor = vbBlack
Me.Refresh
End If

End Sub

Problem:
Up until about 2 months ago this wa working OK, NOW when a user clicks the
filter button and then tries to open form C, nothing happens. Calculating...
appears in the lower left, but nothing happens...

Strange part:
If I have them minimize the Application (YES the Application), then maximize
it, the form show's up. If they close the form C and reopen the form C it's
fine...UNTIL they click the filter button again.

The stranger thing:
This does not happen on MY laptop...

HELP!
David

--
David (Disneygoof)

Message posted via http://www.accessmonster.com

  #2  
Old January 14th, 2009, 04:07 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default Form Opening

Hi David,

please post the code you are using to open form C -- and for any button
on the form that is not working right

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




disneygoof via AccessMonster.com wrote:
I love this site....if I haven't mentioned that before...

I have another STRANGE issues. I have a form 'A' and subform 'B' (continuous
layout). I have buttons on the subform that open another form 'C' and set
the seconf form to the PROJECTID of the subform...works fine.

I added a button to the first form 'A' to filter on a specifc column:
Private Sub AllProjects_Click()

If Me.FilterOn = True Then
Me.Filter = ""
Me.FilterOn = False
Me.AllProjects.Caption = "Show My Projects"
Me.AllProjects.ForeColor = vbBlue
Me.Refresh
Else
Me.Filter = "[LoginUsername] = '" & GetUserName() & "'"
Me.FilterOn = True
Me.AllProjects.Caption = "Show All Projects"
Me.AllProjects.ForeColor = vbBlack
Me.Refresh
End If

End Sub

Problem:
Up until about 2 months ago this wa working OK, NOW when a user clicks the
filter button and then tries to open form C, nothing happens. Calculating...
appears in the lower left, but nothing happens...

Strange part:
If I have them minimize the Application (YES the Application), then maximize
it, the form show's up. If they close the form C and reopen the form C it's
fine...UNTIL they click the filter button again.

The stranger thing:
This does not happen on MY laptop...

HELP!
David

  #3  
Old January 14th, 2009, 04:26 PM posted to microsoft.public.access.forms
disneygoof via AccessMonster.com
external usenet poster
 
Posts: 57
Default Form Opening

Code that runs when I cheick the button and open Form C

Basically I am check to see if the person is ALREADY tracking on a differnet
project or on what we call an XWO or The are starting fresh...

Private Sub Form_Load()

Dim gblTrack As Integer
Dim xwoTrack As Integer

'Me.Filter = "[username] = '" & GetUserName & "'"
'Me.FilterOn = True

'Check for tracking on project as a WHOLE -- LOOK inside Time Tracker
Table
gblTrack = Nz(DLookup("[TrackID]", "tblDetailingTimeTracker", "[Username]
= '" & GetUserName() & "'" & "and not isnull([StartTime])"), 0)

'Check for tracking time on XWO -- LOOK inside Time Tracker Table
xwoTrack = Nz(DLookup("[TrackID]", "tblDetailingTimeTracker", "[Username]
= '" & GetUserName() & "'" & "and isnull([StartTime])"), 0)

If xwoTrack 0 Then
DoCmd.OpenForm "frmDetailingTimeTracker", , , "[TrackID] =" &
xwoTrack
Me.lblProcess.Caption = "Tracking Time"
Me.Frame25.Locked = True
Me.btnStartTrack.Enabled = False
Me.frmDetailingTimeTrackerSubform.SetFocus
ElseIf gblTrack 0 Then
DoCmd.OpenForm "frmDetailingTimeTracker", , , "[TrackID] =" &
gblTrack
Me.lblProcess.Caption = "Tracking Time"
Me.btnStopTrack.Visible = True
Me.btnStartTrack.Visible = False
Me.Frame25.Locked = True
Me.frmDetailingTimeTrackerSubform.Enabled = False
Else
DoCmd.GoToRecord , , acNewRec
Me.lblProcess.Caption = "Awaiting START Sequence"
Me.ProjectID = Forms!frmBulletinAllProjects.ProjectID
Me.Refresh
Me.Username = GetUserName()
Me.EmployeeID = DLookup("[EmployeeID]", "tblEmployee", "
[LoginUsername]= '" & GetUserName() & "'")
Me.btnStopTrack.Visible = False
Me.btnStartTrack.Visible = True
End If

If GetUserName() = "davidw" Then
Me.btnClockedIn.Visible = True
End If

End Sub



strive4peace wrote:
Hi David,

please post the code you are using to open form C -- and for any button
on the form that is not working right

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*

I love this site....if I haven't mentioned that before...

[quoted text clipped - 36 lines]
HELP!
David


--
David (Disneygoof)

Message posted via http://www.accessmonster.com

  #4  
Old January 14th, 2009, 04:28 PM posted to microsoft.public.access.forms
disneygoof via AccessMonster.com
external usenet poster
 
Posts: 57
Default Form Opening

This is the Code behind the BUTTON that opend form C

Private Sub btnTimeTrack_Click()
On Error GoTo Err_btnTimeTrack_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim tracking As Integer
Dim trackProject As String

'Delete any DONE tracking that did not properly delete from Time Track
Temp Table
DoCmd.RunSQL "DELETE FROM tblDetailingTimeTracker WHERE (UserName = '" &
GetUserName() & "' and STST = 'DONE');"

tracking = Nz(DLookup("[ProjectID]", "tblDetailingTimeTracker", "
[Username] ='" & GetUserName() & "' and IsNull([STST])"), 0)
trackProject = Nz(DLookup("[ProjectAlpha] & '-' & [ProjectNo]",
"tblProjectInfo", "[ProjectID] =" & tracking), 0)

If tracking = Me.ProjectID Or tracking = 0 Then
stDocName = "frmDetailingTimeTracker"
DoCmd.OpenForm stDocName
Else
MsgBox "You are currently tracking time against Project " &
trackProject & cHr(13) & "You MUST stop tracking time before you can TRACK
time to another project!" & cHr(13) & cHr(13) & "HAVE A NICE DAY!!!!",
vbExclamation, "Project Time Tracking still in progress..."
End If

Exit_btnTimeTrack_Click:
Exit Sub

Err_btnTimeTrack_Click:
MsgBox err.Description
Resume Exit_btnTimeTrack_Click

End Sub

strive4peace wrote:
Hi David,

please post the code you are using to open form C -- and for any button
on the form that is not working right

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*

I love this site....if I haven't mentioned that before...

[quoted text clipped - 36 lines]
HELP!
David


--
David (Disneygoof)

Message posted via http://www.accessmonster.com

  #5  
Old January 14th, 2009, 04:38 PM posted to microsoft.public.access.forms
disneygoof via AccessMonster.com
external usenet poster
 
Posts: 57
Default Form Opening

Sorry, I said DIFFERENT below...should be just tracking on a project, XWO or
new project to track
David.

disneygoof wrote:
Code that runs when I cheick the button and open Form C

Basically I am check to see if the person is ALREADY tracking on a differnet
project or on what we call an XWO or The are starting fresh...

Private Sub Form_Load()

Dim gblTrack As Integer
Dim xwoTrack As Integer

'Me.Filter = "[username] = '" & GetUserName & "'"
'Me.FilterOn = True

'Check for tracking on project as a WHOLE -- LOOK inside Time Tracker
Table
gblTrack = Nz(DLookup("[TrackID]", "tblDetailingTimeTracker", "[Username]
= '" & GetUserName() & "'" & "and not isnull([StartTime])"), 0)

'Check for tracking time on XWO -- LOOK inside Time Tracker Table
xwoTrack = Nz(DLookup("[TrackID]", "tblDetailingTimeTracker", "[Username]
= '" & GetUserName() & "'" & "and isnull([StartTime])"), 0)

If xwoTrack 0 Then
DoCmd.OpenForm "frmDetailingTimeTracker", , , "[TrackID] =" &
xwoTrack
Me.lblProcess.Caption = "Tracking Time"
Me.Frame25.Locked = True
Me.btnStartTrack.Enabled = False
Me.frmDetailingTimeTrackerSubform.SetFocus
ElseIf gblTrack 0 Then
DoCmd.OpenForm "frmDetailingTimeTracker", , , "[TrackID] =" &
gblTrack
Me.lblProcess.Caption = "Tracking Time"
Me.btnStopTrack.Visible = True
Me.btnStartTrack.Visible = False
Me.Frame25.Locked = True
Me.frmDetailingTimeTrackerSubform.Enabled = False
Else
DoCmd.GoToRecord , , acNewRec
Me.lblProcess.Caption = "Awaiting START Sequence"
Me.ProjectID = Forms!frmBulletinAllProjects.ProjectID
Me.Refresh
Me.Username = GetUserName()
Me.EmployeeID = DLookup("[EmployeeID]", "tblEmployee", "
[LoginUsername]= '" & GetUserName() & "'")
Me.btnStopTrack.Visible = False
Me.btnStartTrack.Visible = True
End If

If GetUserName() = "davidw" Then
Me.btnClockedIn.Visible = True
End If

End Sub

Hi David,

[quoted text clipped - 19 lines]
HELP!
David



--
David (Disneygoof)

Message posted via http://www.accessmonster.com

  #6  
Old January 14th, 2009, 04:39 PM posted to microsoft.public.access.forms
disneygoof via AccessMonster.com
external usenet poster
 
Posts: 57
Default Form Opening

This checks to see if they are on a DIFFERENT Project.

disneygoof wrote:
This is the Code behind the BUTTON that opend form C

Private Sub btnTimeTrack_Click()
On Error GoTo Err_btnTimeTrack_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim tracking As Integer
Dim trackProject As String

'Delete any DONE tracking that did not properly delete from Time Track
Temp Table
DoCmd.RunSQL "DELETE FROM tblDetailingTimeTracker WHERE (UserName = '" &
GetUserName() & "' and STST = 'DONE');"

tracking = Nz(DLookup("[ProjectID]", "tblDetailingTimeTracker", "
[Username] ='" & GetUserName() & "' and IsNull([STST])"), 0)
trackProject = Nz(DLookup("[ProjectAlpha] & '-' & [ProjectNo]",
"tblProjectInfo", "[ProjectID] =" & tracking), 0)

If tracking = Me.ProjectID Or tracking = 0 Then
stDocName = "frmDetailingTimeTracker"
DoCmd.OpenForm stDocName
Else
MsgBox "You are currently tracking time against Project " &
trackProject & cHr(13) & "You MUST stop tracking time before you can TRACK
time to another project!" & cHr(13) & cHr(13) & "HAVE A NICE DAY!!!!",
vbExclamation, "Project Time Tracking still in progress..."
End If

Exit_btnTimeTrack_Click:
Exit Sub

Err_btnTimeTrack_Click:
MsgBox err.Description
Resume Exit_btnTimeTrack_Click

End Sub

Hi David,

[quoted text clipped - 19 lines]
HELP!
David



--
David (Disneygoof)

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200901/1

  #7  
Old January 15th, 2009, 06:56 AM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default Form Opening

hi David,

I need to see your database -- without seeing your structure, it is hard
to say what the problem is -- and the problem may be your form, not the
code to open it. Would you email it to me? Make the subject the same
as this thread subject. I will post questions and comments here, not
privately.

strivepeace2006 at yahoo dot com

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




disneygoof via AccessMonster.com wrote:
This checks to see if they are on a DIFFERENT Project.

disneygoof wrote:
This is the Code behind the BUTTON that opend form C

Private Sub btnTimeTrack_Click()
On Error GoTo Err_btnTimeTrack_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim tracking As Integer
Dim trackProject As String

'Delete any DONE tracking that did not properly delete from Time Track
Temp Table
DoCmd.RunSQL "DELETE FROM tblDetailingTimeTracker WHERE (UserName = '" &
GetUserName() & "' and STST = 'DONE');"

tracking = Nz(DLookup("[ProjectID]", "tblDetailingTimeTracker", "
[Username] ='" & GetUserName() & "' and IsNull([STST])"), 0)
trackProject = Nz(DLookup("[ProjectAlpha] & '-' & [ProjectNo]",
"tblProjectInfo", "[ProjectID] =" & tracking), 0)

If tracking = Me.ProjectID Or tracking = 0 Then
stDocName = "frmDetailingTimeTracker"
DoCmd.OpenForm stDocName
Else
MsgBox "You are currently tracking time against Project " &
trackProject & cHr(13) & "You MUST stop tracking time before you can TRACK
time to another project!" & cHr(13) & cHr(13) & "HAVE A NICE DAY!!!!",
vbExclamation, "Project Time Tracking still in progress..."
End If

Exit_btnTimeTrack_Click:
Exit Sub

Err_btnTimeTrack_Click:
MsgBox err.Description
Resume Exit_btnTimeTrack_Click

End Sub

Hi David,

[quoted text clipped - 19 lines]
HELP!
David


  #8  
Old January 15th, 2009, 01:06 PM posted to microsoft.public.access.forms
disneygoof via AccessMonster.com
external usenet poster
 
Posts: 57
Default Form Opening

Crystal,

I would prefer not to pass out my entire database. Last night while making
some code adjustments, I desided to eliminate the filtering option and all is
working well now. Thanks for you help anyway.

Have a great day.
David

strive4peace wrote:
hi David,

I need to see your database -- without seeing your structure, it is hard
to say what the problem is -- and the problem may be your form, not the
code to open it. Would you email it to me? Make the subject the same
as this thread subject. I will post questions and comments here, not
privately.

strivepeace2006 at yahoo dot com

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*

This checks to see if they are on a DIFFERENT Project.

[quoted text clipped - 42 lines]
HELP!
David


--
David (Disneygoof)

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200901/1

  #9  
Old January 15th, 2009, 01:20 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default Form Opening

Hi David,

that is fine -- I just didn't want to leave you hanging.

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*

  #10  
Old January 15th, 2009, 01:33 PM posted to microsoft.public.access.forms
disneygoof via AccessMonster.com
external usenet poster
 
Posts: 57
Default Form Opening

Crystal,

Not a problem and I thnak you and I apprecitate all you palnned to do for me.

I also decide this morning to change the FORM C design all together. I
occasionally get an error that pops up, this one I know what it is from, so
the form is not 100% working, and I can't accept that. Maybe when I re-write
it, the problem will go away. I will keep you posted, if you like?

David

strive4peace wrote:
Hi David,

that is fine -- I just didn't want to leave you hanging.

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*


--
David (Disneygoof)

Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.