B
Bob V
In tblHorseDetails I have a 4 Fields
[HorseID] Number
[OwnerID] Number
[OwnerPercent] Number
[Invocing] Yes/No, (Check Box)
Effectively you set your horse up with one or more Owners with there percent
in that 1 Horse
I am trying to do is that when that record has a False in Invoicing it will
not create an Invoice
Below is the Code for Distributing the Invoice at the end of the month
Or do you think it has to been done in subSetInvoiceValues 16 row down
Any help would be much appreciated...............Bob
Private Sub cmdSave_Click()
With recInvoice
Dim recHorseOwners As New ADODB.Recordset, dblOwnerPercentAmount As
Double
Dim dblTotal As Double, dblGSTContentsValue As Double
recHorseOwners.Open "SELECT OwnerID,OwnerPercent FROM
tblHorseDetails" _
& " WHERE HorseID=" _
& val(tbHorseID.value) & " AND OwnerID > 0 ORDER BY OwnerID ",
CurrentProject.Connection, adOpenDynamic, adLockOptimistic
If recHorseOwners.EOF = True And recHorseOwners.BOF = True Then
recHorseOwners.Close
Set recHorseOwners = Nothing
MsgBox "This Horse Has No Client Select, [CLOSE] " & vbCrLf &
vbCrLf & " Go to Horses and enter a Client before Distributing.",
vbApplicationModal + vbNo + vbInformation
Exit Sub
End If
If MsgBox("Do You Want To Distribute?", vbQuestion + vbApplicationModal
+ vbYesNo + vbDefaultButton1, "Intellisoft") = vbYes Then
recInvoice.AddNew
subSetInvoiceValues
recInvoice.Update
subDeleteInvoiceItmdt
subBlankForm
lbOwnerlist1.value = ""
lbOwnerlist1.RowSource = ""
lbOwnerlist1.SetFocus
cmdSave.Enabled = False
bModify = False
End If
Forms!frmModify![lstModify] = Null
Form_frmModify.lstModify.Requery
End With
[HorseID] Number
[OwnerID] Number
[OwnerPercent] Number
[Invocing] Yes/No, (Check Box)
Effectively you set your horse up with one or more Owners with there percent
in that 1 Horse
I am trying to do is that when that record has a False in Invoicing it will
not create an Invoice
Below is the Code for Distributing the Invoice at the end of the month
Or do you think it has to been done in subSetInvoiceValues 16 row down
Any help would be much appreciated...............Bob
Private Sub cmdSave_Click()
With recInvoice
Dim recHorseOwners As New ADODB.Recordset, dblOwnerPercentAmount As
Double
Dim dblTotal As Double, dblGSTContentsValue As Double
recHorseOwners.Open "SELECT OwnerID,OwnerPercent FROM
tblHorseDetails" _
& " WHERE HorseID=" _
& val(tbHorseID.value) & " AND OwnerID > 0 ORDER BY OwnerID ",
CurrentProject.Connection, adOpenDynamic, adLockOptimistic
If recHorseOwners.EOF = True And recHorseOwners.BOF = True Then
recHorseOwners.Close
Set recHorseOwners = Nothing
MsgBox "This Horse Has No Client Select, [CLOSE] " & vbCrLf &
vbCrLf & " Go to Horses and enter a Client before Distributing.",
vbApplicationModal + vbNo + vbInformation
Exit Sub
End If
If MsgBox("Do You Want To Distribute?", vbQuestion + vbApplicationModal
+ vbYesNo + vbDefaultButton1, "Intellisoft") = vbYes Then
recInvoice.AddNew
subSetInvoiceValues
recInvoice.Update
subDeleteInvoiceItmdt
subBlankForm
lbOwnerlist1.value = ""
lbOwnerlist1.RowSource = ""
lbOwnerlist1.SetFocus
cmdSave.Enabled = False
bModify = False
End If
Forms!frmModify![lstModify] = Null
Form_frmModify.lstModify.Requery
End With