T
thedrumdoctor
I have been experimenting with a simple cash sheet database with the
following fields:
BillPaymentsTable
PaymentID (AutoNumber & PK)
PaymentDate (Date/Time)
PaymentMethod (Number – has relationship with a lookup table)
Recipient (Number – has relationship with a lookup table)
ReasonForPayment (Number – has relationship with a lookup table)
PaymentAmount (Currency)
From an AutoForm, the database works as it should. In the PaymenAmount field
I enter a prefixed minus number for money going out (i.e., -50.00) and a
non-prefixed number for money going in (i.e., 50.00). However, I would like
to add a validation rule on the Form for the PaymentAmount field to catch out
any transactions entered that are missing the minus prefix where they match
certain ReasonForPayment entries. Each ReasonForPayment entry carries its own
unique ID number from its parent table which has a one-to-many relationship
with the BillsPaymentsTable.
Certain ID’s will refer to money being deducted whilst other ID’s refer to
money being added.
My initial thoughts are something along the lines of:
Test: Is the ReasonForPayment entry number in the record equal to numbers
4,5,6,7,8 (these would be the ID's where a minus entry is mandatory) and is
the entry in the PaymentAmountField equal to a minus number?
If True then validation test is passed.
If False then display and error message advising to correct the number to a
minus value.
I don’t know how to approach this at all so any help would be fantastic!
following fields:
BillPaymentsTable
PaymentID (AutoNumber & PK)
PaymentDate (Date/Time)
PaymentMethod (Number – has relationship with a lookup table)
Recipient (Number – has relationship with a lookup table)
ReasonForPayment (Number – has relationship with a lookup table)
PaymentAmount (Currency)
From an AutoForm, the database works as it should. In the PaymenAmount field
I enter a prefixed minus number for money going out (i.e., -50.00) and a
non-prefixed number for money going in (i.e., 50.00). However, I would like
to add a validation rule on the Form for the PaymentAmount field to catch out
any transactions entered that are missing the minus prefix where they match
certain ReasonForPayment entries. Each ReasonForPayment entry carries its own
unique ID number from its parent table which has a one-to-many relationship
with the BillsPaymentsTable.
Certain ID’s will refer to money being deducted whilst other ID’s refer to
money being added.
My initial thoughts are something along the lines of:
Test: Is the ReasonForPayment entry number in the record equal to numbers
4,5,6,7,8 (these would be the ID's where a minus entry is mandatory) and is
the entry in the PaymentAmountField equal to a minus number?
If True then validation test is passed.
If False then display and error message advising to correct the number to a
minus value.
I don’t know how to approach this at all so any help would be fantastic!