What would the proper way be to enter a sale, then be able to enter 1 or
more sales persons, their "costs" to the sale, and their commission on the
sale?
Then after its been entered, have all the information show up as a part of
the sale? 3 1536
First, you'd need your tables properly designed... a Sales table, a
Salesperson table, and a SalesSalesperso n table. What you have is not a
"many to one" but a "many to many" -- that is multiple salespeople per sale,
but a salesperson can also be involved in multiple sales.
The SalesSalesperso n table would have foreign keys pointing to the record in
the Sales table, and to a single Salesperson. But there could be (will be)
many entries in the SalesSalesperso n table for a given sale or a given
salesperson.
For a particular sale, I'd use a Subform whose RecordSource was a Query on
the SalesSalesperso n table, joined to the Salesperson table. I'd use a
ComboBox in the Form embedded in the Subform Control to choose the
salesman... you may want/need to use some VBA code to create the new entry
in the SalesSalesperso n table and to requery the Form embedded in the
Subform Control.
Larry Linson
Microsoft Access MVP
"RR" <te**********@y ahoo.com> wrote in message
news:dv******** *********@fe2.t exas.rr.com... What would the proper way be to enter a sale, then be able to enter 1 or more sales persons, their "costs" to the sale, and their commission on the sale? Then after its been entered, have all the information show up as a part of the sale?
Could you explain the last paragraph in a different way? I think I
understand the first part, but not the last.
Your salessalesperso n table will have filelds for their "costs" to the sale?
"Larry Linson" <bo*****@localh ost.not> wrote in message
news:XmB4d.8944 $Bg5.2797@trndd c07... First, you'd need your tables properly designed... a Sales table, a Salesperson table, and a SalesSalesperso n table. What you have is not a "many to one" but a "many to many" -- that is multiple salespeople per
sale, but a salesperson can also be involved in multiple sales.
The SalesSalesperso n table would have foreign keys pointing to the record
in the Sales table, and to a single Salesperson. But there could be (will be) many entries in the SalesSalesperso n table for a given sale or a given salesperson.
For a particular sale, I'd use a Subform whose RecordSource was a Query on the SalesSalesperso n table, joined to the Salesperson table. I'd use a ComboBox in the Form embedded in the Subform Control to choose the salesman... you may want/need to use some VBA code to create the new entry in the SalesSalesperso n table and to requery the Form embedded in the Subform Control.
Larry Linson Microsoft Access MVP "RR" <te**********@y ahoo.com> wrote in message news:dv******** *********@fe2.t exas.rr.com... What would the proper way be to enter a sale, then be able to enter 1 or more sales persons, their "costs" to the sale, and their commission on
the sale? Then after its been entered, have all the information show up as a part
of the sale?
The form embedded in the subform control will be based on a query joining
the SalesSalesperso n table with the Salesperson table. The foreign keys in
SalesSalesperso n will point to the Sales record and to the Salesperson
record (for information like, Salesperson's name).
It would be in the SalesSalesperso n record, the one that ties a particular
Salesperson to a particular Sale, that the salesperson's contribution to
this sale would be stored. I am assuming different salespeople can make
different contributions to a given sale, and not necessarily the same
contribution to some other sale.
Use a ComboBox to select the Salesperson, and a textbox to enter the
contribution. The Salesperson Name will be displayed in the ComboBox, but
the id field of that salesperson will be stored. The Combo Box wizard will
lead you by the hand through setting it up.
If that doesn't help, please clarify what is not clear and I'll try to
respond.
Larry Linson
Microsoft Access MVP
"RR" <te**********@y ahoo.com> wrote in message
news:6u******** **********@fe2. texas.rr.com... Could you explain the last paragraph in a different way? I think I understand the first part, but not the last. Your salessalesperso n table will have filelds for their "costs" to the
sale? "Larry Linson" <bo*****@localh ost.not> wrote in message news:XmB4d.8944 $Bg5.2797@trndd c07... First, you'd need your tables properly designed... a Sales table, a Salesperson table, and a SalesSalesperso n table. What you have is not a "many to one" but a "many to many" -- that is multiple salespeople per sale, but a salesperson can also be involved in multiple sales.
The SalesSalesperso n table would have foreign keys pointing to the
record in the Sales table, and to a single Salesperson. But there could be (will
be) many entries in the SalesSalesperso n table for a given sale or a given salesperson.
For a particular sale, I'd use a Subform whose RecordSource was a Query
on the SalesSalesperso n table, joined to the Salesperson table. I'd use a ComboBox in the Form embedded in the Subform Control to choose the salesman... you may want/need to use some VBA code to create the new
entry in the SalesSalesperso n table and to requery the Form embedded in the Subform Control.
Larry Linson Microsoft Access MVP "RR" <te**********@y ahoo.com> wrote in message news:dv******** *********@fe2.t exas.rr.com... What would the proper way be to enter a sale, then be able to enter 1
or more sales persons, their "costs" to the sale, and their commission on the sale? Then after its been entered, have all the information show up as a
part of the sale?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: junk mail |
last post by:
My friend is trying to code a small c program where he wants to force the
user to press enter and only enter to continue.
Currently he is using getchar() with a loop but you can type any number of
characters, which are echoed to screen before you have to press enter.
For example:-
do
{ /* Begin loop */
|
by: ewillyb |
last post by:
Hi,
ASP.NET has some interesting behavior when the user hits the Enter key.
If there are multiple ASP:Buttons (rendered as HTML submits) on the
form, when the user hits enter, the first button's click event will
fire and the page will submit.
I have a series of pages with Previous and Next navigational Btns. The
Previous button is the first button, so when the user hits enter, the
previous page is served up. Enter should result in...
|
by: Adam J. Schaff |
last post by:
I have noticed that if a user closes a form via pressing return (either
while the OK button has focus or if AcceptButton is set to OK for the form)
then the "ENTER" keypress event fires ON THE CALLING FORM! This is very bad
for me, because in my application, Form1 responds to an ENTER keypress by
calling Form2. If the user closes Form2 via an ENTER, then Form1 just
reopens it again, kind of trapping the user in Form2 (they can still close...
|
by: Clark Sann |
last post by:
Can someone help me understand what object should be used as the lock
object? I've seen some programs that use Monitor.Enter(Me). Then, in those
same programs, they sometimes use another object. Why? I would appreciate
it if someone could help me understand the ramifications of picking an
object in this command.
Thank you so much for your help.
Clark
|
by: Marc |
last post by:
Hi,
I want my user to be able to rename a button control by selcting rename
from a menu. This then opens a text box in which to enter the new name
in. I want the button control to inherit the name when the enter key is
| |
by: Zytan |
last post by:
I want the same function to be run whether you press Enter or double
click the listbox. It seems really verbose to write both handlers to
both events everytime, even if they both call the same function, or
one calls the other.
Isn't there an event for 'ListBox selection selected' that is
automatically called by ALL the standard GUI ways of doing it? C'mon,
this is C#, we aren't supposed to be programming the GUI. There has
to be such...
|
by: JWest46088 |
last post by:
I want the user to enter information, such as names, and then I want to ask them after they entered the first name if they want to enter another name. How would I do that?
This is what I have so far:
cout << "Would you like to enter an artist's information? ";
cin >> answer;
if(answer = 'Y' || 'y')
{
cout << "Enter artist: ";
|
by: Rotsey |
last post by:
Hi,
I am having a problem trying to select an item with the enter key.
I want to work the combo with the keyboard.
So when I use the down arrow to browse the list I want to then
hit the enter key as if selecting an item with the mouse.
How do I do this?
|
by: MichaelK |
last post by:
Who knows how to prevent submitting a form on the press Enter button before
all fields on the form are filled up.
People just enter the first field hit Enter and it submits the form and
doing validation,
of course flushing with the bunch of messages because rest of the fields are
empty.
I remember I had some pages where wrote the code to go on the next field
when pressed the Enter button (Tab like), because it didn't go anywhere at
all....
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |