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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |