Hi all and Happy Easter to those that celebrate it....
I am making some changes to my db now that i am using it daily and i have run into something i need some assistance with... Please
I have a few forms where I either receive funds or purchase from a person or business. I want to make this just a list. OK
So option 1 = business, option 2 = Person
TxtBox = PurchaseName where i would type in a name of a business or person and this would have a NIL function
If yes, then Add name, If no, Undo
! Not sure if to put this in before update or after update?
Next I want it to seek the name i entered to see if its in the tblBusiness if option Business or tblPerson if Person is selected.
Something like?
If Business option, DLookUp BusinessID, tblBusiness, BusinessName
If the BusinessName exists, then
CmdView.Caption = View Business Details
If BusinessName does not exist, then
CmdView.Caption = Add Business Details
Else If Person option, DLookUp PersonID, tblPerson, PersonFullName
If the PersonFullName exists, then
CmdView.Caption = View Person Details
If PersonFullName does not exist, then
CmdView.Caption = Add Person Details
This possibly in the after update or after insert of the txtBox entry? Not real sure
If in the NIL function, i select No, then I want it to exit sub and not perform the DLookUP...
If in the NIL function I select Yes, then I want the DLookUp to fire, I also want to have the
DLookUp fire if I enter a name that is in the List....
And then I will put the necessary code on the button click to determine what it needs to do if clicked.
I am not real sure how the code would look for the DLookUp with the If or IIf possibly so could I please
get some assistance on this.
Thank you
Dave