How to save data on a form to a table.

WillJ

Registered User.
Local time
Today, 05:29
Joined
Oct 20, 2012
Messages
40
Hi All,

I'm hoping you could help me here.

I want to save selected areas on a form into the relevant fields in a table and am clueless how to after creating row sources not related to the form I require the information store in i.e. one dependent combo box fulling event names into it when events is selected as request type; this information is pulled from the events table, not the request table where I require it to be stored.


  1. My first question would be how do I assign a button to store the relevant information from my requests form into my requests table.
  2. And my second question/problem is that I want the value of one of the dependent boxes to store as and ID in the table request table. For example;

The user selects the request Type as 'Company' from the first combo box, the dependent combo box below then lists, only, the CompanyNames from that are available in the database. The user then goes down the form filling in the other relevant areas, etc, etc. When the user then clicks Save Request, the event will store all the required information in the required fields. What is vital is that the company name selected will store the relevant id the company id field in the requests table.

Any help would be greatly appreciated!

Thanks all
 
I have been taught recently that the Company Name should not be stored in any table except the Company table. You can use a query to pull the company name and view it but only the Company Number will be stored.

Take a look at this thread http://www.access-programmers.co.uk/forums/showthread.php?t=235126.

There is a fictitious database attached (amend 5) and you can take a look at that to give you guidance. Look at my ORDER ENTRY WITH PAYMENTS form and you can see that when I select the CUSTOMER NUMBER it automatically fills in the company name in the next field. It is not stored in the table but it can be viewed using the VIEW ALL ORDERS QUERY. Hopefully this will help you because the gentleman that helped me was amazing!
 
Last edited:
I have been taught recently that the Company Name should not be stored in any table except the Company table. You can use a query to pull the company name and view it but on the Company Number will be stored.
attachment.php
 

Attachments

  • greatjobsmile.jpg
    greatjobsmile.jpg
    5.7 KB · Views: 418
Hi Kelly,

In advance, THANKYOU!

I can't tell you what a life saver this forum is being. I'll be sure to inform you of my progress when I take a look at this tomorrow; it's 11:00pm in the UK and I've got an early start tomorrow :D.

I'm looking forward to getting on with this!

Warm Regards,

Will
 
I couldn't sleep in the end so I jumped back on the PC.

I've got to say I'm a bit confused as to how this can be done, even with you kind advice Kelly.

I have an after event command specified on one of my Request Type Combo. When the category is selected the dependent combo displays the relevant data, e.g. if contact is selected the contacts list of names comes up, no ids (in the Request To).

I'm unsure if its as straight forward as the display name is used to match up with the corresponding id as the after event code only ask to display the information from the e.g. ContactsName field.

What I want is when the contact Names is in the combo and I click save I want the record to be added, without the duplicate name, as you say, and just withe the relevant id number of the associated Type and To ... if you catch my drift.

Maybe I'm just over complicating it ... ?
 

Users who are viewing this thread

Back
Top Bottom