Originally Posted by
Missinglinq
Three questions:
- What if the user decides to dump the partial record, rather than complete it? You really need to allow this, if need be.
- What, exactly, is the code behind your cmdClose Command Button?
- Can you strip your file of confidential data, save it in either 2007 or 2003 file format, Zip it up and attach it to a post?
Linq
;0)>
1. I have a button that will delete and close the form.
2. Its a simple macro that does a CloseWindow command. Nothing special
3. I wish I could but I have lots of images loaded into the file which makes it massive. There is nothing secret about it. I have TeamViewer and would allow you to take a look that way. I will message you my phone number. If you would like to call me, I will be here all day banging my head on the table.
4. I can post the code I have for the form I am working on. I don't know if it will help. I have tried to annotate everything.
Code:
Option Compare Database
'I made this massive section of AfterUpdate commands to work with my Form_Current commands.
'I thought if I made it rerun the form current each time it would check for logic.
'I was wrong
Private Sub Card_Holder_AfterUpdate()
Form_Current
End Sub
Private Sub Vendor_AfterUpdate()
Form_Current
End Sub
Private Sub Date_Requested_AfterUpdate()
Form_Current
End Sub
Private Sub Description_AfterUpdate()
Form_Current
End Sub
Private Sub Debit_AfterUpdate()
Form_Current
End Sub
Private Sub Requestor_AfterUpdate()
Form_Current
End Sub
Private Sub Status_AfterUpdate()
Form_Current
End Sub
Private Sub Catagory_AfterUpdate()
Form_Current
End Sub
Private Sub Item_Catagory_AfterUpdate()
Form_Current
End Sub
'This small bit of code only allows users to reconcile an order if the "AO" has typed in his info. Plus alot more
'I think this is a sloppy but I dont know what else to do.
Private Sub Form_Current()
If Nz(Me.AO, "") = "" Then
Me.Command154.Visible = False 'Reconcile Button
Else
Me.Command154.Visible = True 'Reconcile Button
End If
If Nz(Me.Card_Holder, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Vendor, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Date_Requested, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Description, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Debit, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Requestor, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Status, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Catagory, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
If Nz(Me.Item_Catagory, "") = "" Then
Me.cmdClose.Visible = False 'Submit Button
Else
Me.cmdClose.Visible = True 'Submit Button
End If
End Sub
' This is the Reconcile Order button
Private Sub Command154_Click()
Label143.Visible = True
Label140.Visible = True
Label141.Visible = True
Label142.Visible = True
Labelpaid.Visible = True
Reconciled_Date.Visible = True
Basic_Amount.Visible = True
Paidcheckbox.Visible = True
Command253.Visible = True
'Reconciled.Visible = True 'I have these out of the mix ATM
'Label139.Visible = True 'I have these out of the mix ATM
'Catagory.Visible = True 'I have these out of the mix ATM
End Sub
'This code makes sure that the user thinks before he clicks. If they click the paid box it will move the order to reconsiled.
Private Sub Paidcheckbox_Click()
If MsgBox("Are you sure you matched 100% of your current order on US Bank? Once you click this it will move this transaction to the Reconciled section", vbQuestion + vbYesNo) = vbYes Then
Paidcheckbox.Value = True
Else
Paidcheckbox.Value = False
End If
End Sub