data forms
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Data for forms

Data for forms

· Low Priority · Version 2007

replyReply Sun 29 Jan 2012, 22:32Delegate Colin said...

Colin has attended:
Excel Intermediate course

Data for forms

I have a unique identifier, which I want to point to be able to be selected from a list.

When selecting the unique identifier (not a primary key) I would like selected information to come up in the form.

I.E when inputing the unique code of a branch, I would like the name of the store, address and branch manager to auto populate. Could you please advise.

For upcoming training course dates see: Pricing & availability

replyReply Mon 30 Jan 2012, 12:51Trainer Doug said...

RE: Data for forms

Hi Colin

I've set up a small example called testdropdown.

The form SalesInfo has a dropdown for selecting a Branch code. Once selected this populates the Banch name, address and manager.

The SalesInfo form stores data into the SalesInfo table. In each record once a Brance code is entered, the branch info is drawn from the Branches table.

However for this to work the Branch code in the Branches table has to be a Primary key. Removing the primary key prevents the SalesInfo form being updatable.

Would there be any way you could make your Branch code a primary key?

Doug
Best STL

Attached files...

testdropdown.accdb

replyReply Mon 30 Jan 2012, 22:49Delegate Colin said...

RE: Data for forms

Hi Doug

Thanks for the response.

A few things I am not clear about.

1) There does not appear to be a primary key set in either of the tables. I can't see it in the design view, but can see it in the relationships?>

2) How do you set the dropdown table? and how do you get it to auto select the other data? In the design view of the branches table, there does not appear to be a setting in the field properties that stands out.

3) How do you launch a new form each time you want to input data? I.e. you will have to submit a new form each month?

4) I had set some relationships, 1 is to many (in my example) but had to undo as I had not set up my data correctly. If I set relationships, will this allow me to avoid using the primary key?

I thought I was getting somewhere, but have to go back to the beginning to move forward again!

Looking forward to your help.

Colin

replyReply Tue 31 Jan 2012, 10:39Trainer Doug said...

RE: Data for forms

Hi Colin

I'll do my best to answer your questions

1) There does not appear to be a primary key set in either of the tables. I can't see it in the design view, but can see it in the relationships?>

There needs to be a primary key for the Branchcode field in the Branches table. I've resent my example again in case it wasn't set.

2) How do you set the dropdown table? and how do you get it to auto select the other data? In the design view of the branches table, there does not appear to be a setting in the field properties that stands out.

The combo box field is in the SalesInfo table on the Branch field.
To create the SalesInfo form use Create, More Forms, Form Wizard.
Choose the Branch field from the SalesInfo table
Choose the BranchName, Address, Manger from the Branches table. I added two more fields Date and Sales from the SalesIndo table to create some context.

3) How do you launch a new form each time you want to input data? I.e. you will have to submit a new form each month?

Click the new record button (>*) at the bottom on the navigation buttons to enter new blank record each month. Or add a form control command button onto your form to do the same. (In Form Design view the one marked xxxx. I've added an 'add new record' button on my example).

4) I had set some relationships, 1 is to many (in my example) but had to undo as I had not set up my data correctly. If I set relationships, will this allow me to avoid using the primary key?

Unfortunately there has to be a primary key in the Branches table for the form to update.

I thought I was getting somewhere, but have to go back to the beginning to move forward again!

Good to ask questions like you are doing!

Doug

 

Please browse our web site to find out more about
microsoft-access-course and other Microsoft training courses.

Access tip:

Using the Quick Access Toolbar in Access 2010

The Quick Access Toolbar is included in virtually every Office product, including Outlook 2010, Word 2010, Excel 2010, and PowerPoint 2010.

You will find the Quick Access Toolbar in the top-left side of the window. To begin, click the Customize button (it's the little black arrow at the end of the toolbar).

Simply click the commands you want to include.

Virtually any command can be added to the Quick Access Toolbar. Click the More Commands option and a new window will open from where you can browse the commands including those not on the ribbon.

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard