Kamis, 10 Mei 2012

RE: [MS_AccessPros] Table not being updated

 

Phil-

What's the Control Source of the "Shop" combo? I bet it's blank. And you
should Requery the shop combo in the AfterUpdate event of the Company combo and
the Current event of the form to keep everything in sync.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

------------------

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of pdk444444
Sent: Thursday, May 10, 2012 7:25 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Table not being updated

 
Hi

2 of my tables are called company and shop.

I have a table (I'll call it Main) which has many fields, 2 of which are called
company and shop and these 2 fields lookup from the 2 tables.

I know that you guys hate lookups but this is what I have !!!!

I then have a form based on the main table.

The field 'company' on this form uses the lookup defined in the table to drop
down a list of companies for the user to choose from.

What i then want is for the field 'shop' to drop down a list of shops which is a
subset of all shops based on the entry in field 'company'

To achieve this I have a query which uses forms!main!company as the criteria and
I use this in the rowsource property of the shops field.

When entering a 'main' record all seems fine and the correct shops for the
company entered are displayed in the drop down list and when the user selects a
shop it is displayed in the field.

However, the value for shop is not then stored in the main record and of course
I want it to be.

Can someone please tell me why and whether there is something I can do to
achieve this?

cheers

Phil

I have a form where one of the fields drops down a list which is based on a
query which is dependent on the value entered in another field.

The correct list

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar