![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello I am working on a database to track sales reps involved on a sale. I would like to flag the sales rep that initiated the sale but read that creating fields used to flag are not recommended. Can anyone provide a suggestion of another way to track this information? Below is how my db is structured (and thank you Roger from this news group with all your help with creating this structure) tblOrder * *salesOrderID * *salesAmount * *customerName tblOrderRep * *salesOrderID * *repID * *flag (this is the field i was going to add to flag which rep initiated the sale) tblRep * *repID * *repName * *tier * *upline Thank you in advance for your time and advice. Matt |
#3
| |||
| |||
|
|
On Oct 14, 3:13*pm, spima05 <mspilot... (AT) gmail (DOT) com> wrote: Hello I am working on a database to track sales reps involved on a sale. I would like to flag the sales rep that initiated the sale but read that creating fields used to flag are not recommended. Can anyone provide a suggestion of another way to track this information? Below is how my db is structured (and thank you Roger from this news group with all your help with creating this structure) tblOrder * *salesOrderID * *salesAmount * *customerName tblOrderRep * *salesOrderID * *repID * *flag (this is the field i was going to add to flag which rep initiated the sale) tblRep * *repID * *repName * *tier * *upline Thank you in advance for your time and advice. Matt I use 'yes / no' fields (or true / false) all the time what was the reason given to not use them by the way, tblOrderRep is the current table to use... you just need a form afterupdate event to make sure there is never more than one rep per order that initiated the sale- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
|
On Oct 14, 5:44*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote: On Oct 14, 3:13*pm, spima05 <mspilot... (AT) gmail (DOT) com> wrote: Hello I am working on a database to track sales reps involved on a sale. I would like to flag the sales rep that initiated the sale but read that creating fields used to flag are not recommended. Can anyone provide a suggestion of another way to track this information? Below is how my db is structured (and thank you Roger from this news group with all your help with creating this structure) tblOrder * *salesOrderID * *salesAmount * *customerName tblOrderRep * *salesOrderID * *repID * *flag (this is the field i was going to add to flag which rep initiated the sale) tblRep * *repID * *repName * *tier * *upline Thank you in advance for your time and advice. Matt I use 'yes / no' fields (or true / false) all the time what was the reason given to not use them by the way, tblOrderRep is the current table to use... you just need a form afterupdate event to make sure there is never more than one rep per order that initiated the sale- Hide quoted text - - Show quoted text - Thank you Roger. The form after update event is a good idea. Is it as simple as creating a query to count the number of yes flags to ensure there is only one or do i need to know VB to create an event? Thank you Matt- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
On Oct 14, 5:17*pm, spima05 <mspilot... (AT) gmail (DOT) com> wrote: On Oct 14, 5:44*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote: On Oct 14, 3:13*pm, spima05 <mspilot... (AT) gmail (DOT) com> wrote: Hello I am working on a database to track sales reps involved on a sale. I would like to flag the sales rep that initiated the sale but read that creating fields used to flag are not recommended. Can anyone provide a suggestion of another way to track this information? Below is how my db is structured (and thank you Roger from this news group with all your help with creating this structure) tblOrder * *salesOrderID * *salesAmount * *customerName tblOrderRep * *salesOrderID * *repID * *flag (this is the field i was going to add to flag which rep initiated the sale) tblRep * *repID * *repName * *tier * *upline Thank you in advance for your time and advice. Matt I use 'yes / no' fields (or true / false) all the time what was the reason given to not use them by the way, tblOrderRep is the current table to use... you just need a form afterupdate event to make sure there is never more than one rep per order that initiated the sale- Hide quoted text - - Show quoted text - Thank you Roger. The form after update event is a good idea. Is it as simple as creating a query to count the number of yes flags to ensure there is only one or do i need to know VB to create an event? Thank you Matt- Hide quoted text - - Show quoted text - in the form's afterUpdate event you need this VBA dim strWhere as string strWhere = "salesOrderId = " & salesOrderId & " AND " strWhere = strWhere & *"repId = " & repId if (dcount("salesOrderId", "tblOrderRep", strWhere) > 1) then * * msgbox "More than one rep initiating this sales order" end if- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |