I have a client with an access 2003 database and I need to change something for them. I normally work in php mysql so I am a little out of my element. They are submitting a form that processes and checks for fees. They have a sale number that is normally based on the date.
20080612 for example.
Well on fridays they are changing the sale number to
20080612FR to indicate it is friday. Normall their buyer and seller fees are based on numbers entered in the database, but on Fridays they will be the same for everyone. $200.00
So, what I need to do is say if the SelectAuction field ends in FS then skip searching the database for buyer and seller fees and just make each of those numbers 200. I really appreciate any help anyone can give on this. I am just totally out of my element here. I can kind of see where the changes need to be made, but don't know how to make them.
I guess I need to say if SelectAuction = wildcard with FR at the end then skip the seller fee and buyer fee lookup and make the seller and buyer fee 200.00
20080612 for example.
Well on fridays they are changing the sale number to
20080612FR to indicate it is friday. Normall their buyer and seller fees are based on numbers entered in the database, but on Fridays they will be the same for everyone. $200.00
So, what I need to do is say if the SelectAuction field ends in FS then skip searching the database for buyer and seller fees and just make each of those numbers 200. I really appreciate any help anyone can give on this. I am just totally out of my element here. I can kind of see where the changes need to be made, but don't know how to make them.
I guess I need to say if SelectAuction = wildcard with FR at the end then skip the seller fee and buyer fee lookup and make the seller and buyer fee 200.00
Code:
getterms
' Calculate Fees
Dim x As Variant
If Me![SaleStatus] > 1 Then
'calc Buyers fee
Me![BuyerFees] = DLookup("BuyerFees", "qryBuyerSpecialFees_SaleID")
If IsNull(Me![BuyerFees]) Then
Me![BuyerFees] = DLookup("BuyerFees", "qrybuyersfee_SaleID")
End If
'calc Sellers fee
Me![SellerFees] = DLookup("SellerFees", "QrySellerSpecialFees_SaleID")
If IsNull(Me![SellerFees]) Then
Me![SellerFees] = DLookup("SellerFees", "qrysellersfee_SaleID")
End If
'calc Automatic Transfer Fee
If Me![AutoMaticTransFeeDone] <> True Then
Me![AutoMaticTransFeeDone] = True
Dim AutoTransFee As Double
AutoTransFee = 0
AutoTransFee = Nz(DLookup("TransportFees", "qrySellerAutoTransferFee_SaleID"))
If AutoTransFee > 0 Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "qrySellerAutoTransferFee_Append_SaleID"
DoCmd.SetWarnings True
End If
End If
End If
Last edited: