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  

check box on continuous form



 
 
Thread Tools Display Modes
  #1  
Old May 16th, 2005, 06:34 PM
DBrown
external usenet poster
 
Posts: n/a
Default check box on continuous form

Hello, I am pretty new to Access 2003. I have linked several databases to one
central database. It is used to track tools. When you request a tool from the
several side, it shows as a request on the central side with a project
number. The person who maintains the tools will then check the "out" checkbox
to complete the transaction and transfer the project number to the location
box. The problem is that he also has the option to check out tools using a
combo box instead of a request. I cannot make this happen. Please look at my
code and tell me what I am doing wrong. Thanks so much in advance.

Private Sub OUT_Click()
If IsNull(Me.ComboLocation) Then
MsgBox "Please Select a Location", vbOKOnly, "Select Location"
Cancel = True
Me.Undo
ElseIf Me.ComboLocation = "By Request" And Not IsNumeric(Me.RequestJobNo) Then
MsgBox "There Is No Request For That Tool", vbOKOnly, "No Request"
Cancel = True
Me.Undo
ElseIf Me!ComboLocation = "By Request" And Me!OUT = True And Not
IsNull(Me!RequestJobNo) Then
Me.DateOut = Date
Me.DateIn = ""
Me.IN = False
Me.Location = Me.RequestJobNo
Me.DateOut.SetFocus
ElseIf Me.OUT = True And Me.ComboLocation "By Request" Then
Me.DateOut = Date
Me.DateIn = ""
Me.IN = False
Me.Location = Me.ComboLocation
Me.DateOut.SetFocus
Else
Me.DateOut = ""
Me.DateIn = Date
Me.Location = "Shop"
Me.IN = True
Me.DateIn.SetFocus
End If

End Sub
  #2  
Old May 17th, 2005, 03:34 AM
MacDermott
external usenet poster
 
Posts: n/a
Default

Perhaps you could tell us
What your code is doing that you don't want.
What your code isn't doing that you do want.

"DBrown" wrote in message
...
Hello, I am pretty new to Access 2003. I have linked several databases to

one
central database. It is used to track tools. When you request a tool from

the
several side, it shows as a request on the central side with a project
number. The person who maintains the tools will then check the "out"

checkbox
to complete the transaction and transfer the project number to the

location
box. The problem is that he also has the option to check out tools using a
combo box instead of a request. I cannot make this happen. Please look at

my
code and tell me what I am doing wrong. Thanks so much in advance.

Private Sub OUT_Click()
If IsNull(Me.ComboLocation) Then
MsgBox "Please Select a Location", vbOKOnly, "Select Location"
Cancel = True
Me.Undo
ElseIf Me.ComboLocation = "By Request" And Not IsNumeric(Me.RequestJobNo)

Then
MsgBox "There Is No Request For That Tool", vbOKOnly, "No Request"
Cancel = True
Me.Undo
ElseIf Me!ComboLocation = "By Request" And Me!OUT = True And Not
IsNull(Me!RequestJobNo) Then
Me.DateOut = Date
Me.DateIn = ""
Me.IN = False
Me.Location = Me.RequestJobNo
Me.DateOut.SetFocus
ElseIf Me.OUT = True And Me.ComboLocation "By Request" Then
Me.DateOut = Date
Me.DateIn = ""
Me.IN = False
Me.Location = Me.ComboLocation
Me.DateOut.SetFocus
Else
Me.DateOut = ""
Me.DateIn = Date
Me.Location = "Shop"
Me.IN = True
Me.DateIn.SetFocus
End If

End Sub



  #3  
Old May 17th, 2005, 10:20 PM
DBrown
external usenet poster
 
Posts: n/a
Default

MacDermott,
Thanks for replying. I figured it out. I couldn't get past verifying
"RequestJobNo" field. It would either be empty or have a four digit number in
it. I used the "Len" function to verify the results.
Thanks Again

"MacDermott" wrote:

Perhaps you could tell us
What your code is doing that you don't want.
What your code isn't doing that you do want.

"DBrown" wrote in message
...
Hello, I am pretty new to Access 2003. I have linked several databases to

one
central database. It is used to track tools. When you request a tool from

the
several side, it shows as a request on the central side with a project
number. The person who maintains the tools will then check the "out"

checkbox
to complete the transaction and transfer the project number to the

location
box. The problem is that he also has the option to check out tools using a
combo box instead of a request. I cannot make this happen. Please look at

my
code and tell me what I am doing wrong. Thanks so much in advance.

Private Sub OUT_Click()
If IsNull(Me.ComboLocation) Then
MsgBox "Please Select a Location", vbOKOnly, "Select Location"
Cancel = True
Me.Undo
ElseIf Me.ComboLocation = "By Request" And Not IsNumeric(Me.RequestJobNo)

Then
MsgBox "There Is No Request For That Tool", vbOKOnly, "No Request"
Cancel = True
Me.Undo
ElseIf Me!ComboLocation = "By Request" And Me!OUT = True And Not
IsNull(Me!RequestJobNo) Then
Me.DateOut = Date
Me.DateIn = ""
Me.IN = False
Me.Location = Me.RequestJobNo
Me.DateOut.SetFocus
ElseIf Me.OUT = True And Me.ComboLocation "By Request" Then
Me.DateOut = Date
Me.DateIn = ""
Me.IN = False
Me.Location = Me.ComboLocation
Me.DateOut.SetFocus
Else
Me.DateOut = ""
Me.DateIn = Date
Me.Location = "Shop"
Me.IN = True
Me.DateIn.SetFocus
End If

End Sub




 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ECHO Causing Problems DS General Discussion 5 May 17th, 2005 02:19 AM
One Check box to check all check boxes Mark Senibaldi Using Forms 2 April 12th, 2005 04:27 PM
Need to clear controls of Filter form Jan Il Using Forms 2 November 28th, 2004 03:04 PM
Selection check box on form Jeff Gil Using Forms 3 August 8th, 2004 12:45 AM
dlookup miaplacidus Using Forms 9 August 5th, 2004 09:16 PM


All times are GMT +1. The time now is 10:29 AM.


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