Control Will Not Update

D

DJM2290

How do I get a control to update in a form without closing the form and
re-opening it? It used to work fine before I converted the DB to 2007.
Basically, a user keys in an item number, and I would like the item
description control to populate after they move out of the item control
field. The source for the form is a select query. Any help would be
appreciated.
 
D

Dirk Goldgar

DJM2290 said:
How do I get a control to update in a form without closing the form and
re-opening it? It used to work fine before I converted the DB to 2007.
Basically, a user keys in an item number, and I would like the item
description control to populate after they move out of the item control
field. The source for the form is a select query. Any help would be
appreciated.


The only thing that has change in this regard between Access 2003 (or
earlier) and Access 2007 is that VBA code doesn't run in Access 2007 unless
you explicitly enable it or put the database in a trusted location (as
established in the Trust Center settings).

Could that be the problem? Is the description being set by VBA code?
 
D

DJM2290

It is not set by VBA code...the control source for the "description" field is
just "SKU Desc" which is a field in the source query.
 
D

Dirk Goldgar

DJM2290 said:
It is not set by VBA code...the control source for the "description" field
is
just "SKU Desc" which is a field in the source query.

Please post the SQL of the form's recordsource, and the name, type, and
Control Source properties of each relevant control. If a control is a combo
box, please also post its Row Source, Bound Column, and Column Count
properties.
 
D

DJM2290

Below is the SQL from the source...the relevant controls are as follows..

Name: SKU #
Type: Text Box
Countrol Source: SKU #

Name: SKU Description
Type: Text Box
Countrol Source: SKU Desc

There is a combo box, but I don't think it is relevant to the problem.
Name: Ad Date
Control Source: Ad Date
Row Source: Ad Dates
Bound Column: 1
Column Count :1

SELECT [Ad Detail].[Ad Date], [Ad Detail].Division,
INTREPIDD_SKUMSTR.SRS_DEPT AS Dept, INTREPIDD_SKUMSTR.SRS_CLASS AS Class, [Ad
Detail].[SKU #], [Ad Detail].[Placeholder Dept], INTREPIDD_SKUMSTR.SM_DESC AS
[SKU Desc], [Ad Detail].[Placeholder Description], [Ad Detail].[Placeholder
Cost (per unit)], [Ad Detail].[Include for 12 Week Meeting (type Y if yes)],
INTREPIDD_SKUMSTR.SM_LAST_COST AS [Last Cost], [Ad Detail].Status, [Ad
Detail].[Current Retail], [Ad Detail].[Event Retail], [Ad Detail].[Comp
Retail], [Ad Detail].[# Stores], [Ad Detail].[Baseline Units], [Ad
Detail].[Unit Sales Forecast], [Ad Detail]![Event Retail]*[Ad Detail]![Unit
Sales Forecast] AS [Sales Forecast $], [Ad Detail].[Ad Prep], [Ad
Detail]![Unit Sales Forecast]/[Ad Detail]![Ad Prep] AS [Ad Sell Thru], [Ad
Detail].[Basis for Projection], [Ad Detail].Comments, ([Ad Detail]![Current
Retail]-[Ad Detail]![Event Retail])*[Ad Detail]![Unit Sales Forecast] AS
[Mkdn Forecast $]
FROM ([Ad Detail] LEFT JOIN INTREPIDD_SKUMSTR ON [Ad Detail].[SKU #] =
INTREPIDD_SKUMSTR.SRS_SKU) LEFT JOIN INTREPIDD_DEPTTBL ON
INTREPIDD_SKUMSTR.SRS_DEPT = INTREPIDD_DEPTTBL.SRS_DEPT
WHERE ((([Ad Detail].[Ad Date])=[Which Ad Date? Format must be mmddyy]) AND
(([Ad Detail].Division)=[What Division?]))
ORDER BY [Ad Detail].[Ad Date], [Ad Detail].Division,
INTREPIDD_SKUMSTR.SRS_DEPT, INTREPIDD_SKUMSTR.SRS_CLASS, [Ad Detail].[SKU #];
 
D

Dirk Goldgar

DJM2290 said:
Below is the SQL from the source...the relevant controls are as follows..

Name: SKU #
Type: Text Box
Countrol Source: SKU #

Name: SKU Description
Type: Text Box
Countrol Source: SKU Desc

There is a combo box, but I don't think it is relevant to the problem.
Name: Ad Date
Control Source: Ad Date
Row Source: Ad Dates
Bound Column: 1
Column Count :1

SELECT [Ad Detail].[Ad Date], [Ad Detail].Division,
INTREPIDD_SKUMSTR.SRS_DEPT AS Dept, INTREPIDD_SKUMSTR.SRS_CLASS AS Class,
[Ad
Detail].[SKU #], [Ad Detail].[Placeholder Dept], INTREPIDD_SKUMSTR.SM_DESC
AS
[SKU Desc], [Ad Detail].[Placeholder Description], [Ad
Detail].[Placeholder
Cost (per unit)], [Ad Detail].[Include for 12 Week Meeting (type Y if
yes)],
INTREPIDD_SKUMSTR.SM_LAST_COST AS [Last Cost], [Ad Detail].Status, [Ad
Detail].[Current Retail], [Ad Detail].[Event Retail], [Ad Detail].[Comp
Retail], [Ad Detail].[# Stores], [Ad Detail].[Baseline Units], [Ad
Detail].[Unit Sales Forecast], [Ad Detail]![Event Retail]*[Ad
Detail]![Unit
Sales Forecast] AS [Sales Forecast $], [Ad Detail].[Ad Prep], [Ad
Detail]![Unit Sales Forecast]/[Ad Detail]![Ad Prep] AS [Ad Sell Thru], [Ad
Detail].[Basis for Projection], [Ad Detail].Comments, ([Ad
Detail]![Current
Retail]-[Ad Detail]![Event Retail])*[Ad Detail]![Unit Sales Forecast] AS
[Mkdn Forecast $]
FROM ([Ad Detail] LEFT JOIN INTREPIDD_SKUMSTR ON [Ad Detail].[SKU #] =
INTREPIDD_SKUMSTR.SRS_SKU) LEFT JOIN INTREPIDD_DEPTTBL ON
INTREPIDD_SKUMSTR.SRS_DEPT = INTREPIDD_DEPTTBL.SRS_DEPT
WHERE ((([Ad Detail].[Ad Date])=[Which Ad Date? Format must be mmddyy])
AND
(([Ad Detail].Division)=[What Division?]))
ORDER BY [Ad Detail].[Ad Date], [Ad Detail].Division,
INTREPIDD_SKUMSTR.SRS_DEPT, INTREPIDD_SKUMSTR.SRS_CLASS, [Ad Detail].[SKU
#];


I'm puzzled. I don't see any reason why that query wouldn't do the
"autolookup" that comes in so handy. A test query that I made, which also
involves two left joins in a similar fashion, works fine in Access 2007;
likewise a form that I based on the query.

Would you be interested in sending me a copy of your database to look at?
If so, you can send it to the address derived by removing NO SPAM and
".invalid" from the reply address of this message. If that address isn't
visible to you, you can get my address from my web site, which is listed in
my sig. Do *not* post my real address in the newsgroup -- I don't want to
be buried in spam and viruses. It would be best if you could make a
cut-down copy of the database, containing just the elements necessary to
demonstrate the problem, compact the copy, and and zip it for sending.
 
D

DJM2290

Yes...it is strange. It workd fine before I converted it to 2007. Note that
the main table in the query is in a backend database which is still in an
older version of Access. I have sent a trimmed down version of the database.

Thanks again.

Dirk Goldgar said:
DJM2290 said:
Below is the SQL from the source...the relevant controls are as follows..

Name: SKU #
Type: Text Box
Countrol Source: SKU #

Name: SKU Description
Type: Text Box
Countrol Source: SKU Desc

There is a combo box, but I don't think it is relevant to the problem.
Name: Ad Date
Control Source: Ad Date
Row Source: Ad Dates
Bound Column: 1
Column Count :1

SELECT [Ad Detail].[Ad Date], [Ad Detail].Division,
INTREPIDD_SKUMSTR.SRS_DEPT AS Dept, INTREPIDD_SKUMSTR.SRS_CLASS AS Class,
[Ad
Detail].[SKU #], [Ad Detail].[Placeholder Dept], INTREPIDD_SKUMSTR.SM_DESC
AS
[SKU Desc], [Ad Detail].[Placeholder Description], [Ad
Detail].[Placeholder
Cost (per unit)], [Ad Detail].[Include for 12 Week Meeting (type Y if
yes)],
INTREPIDD_SKUMSTR.SM_LAST_COST AS [Last Cost], [Ad Detail].Status, [Ad
Detail].[Current Retail], [Ad Detail].[Event Retail], [Ad Detail].[Comp
Retail], [Ad Detail].[# Stores], [Ad Detail].[Baseline Units], [Ad
Detail].[Unit Sales Forecast], [Ad Detail]![Event Retail]*[Ad
Detail]![Unit
Sales Forecast] AS [Sales Forecast $], [Ad Detail].[Ad Prep], [Ad
Detail]![Unit Sales Forecast]/[Ad Detail]![Ad Prep] AS [Ad Sell Thru], [Ad
Detail].[Basis for Projection], [Ad Detail].Comments, ([Ad
Detail]![Current
Retail]-[Ad Detail]![Event Retail])*[Ad Detail]![Unit Sales Forecast] AS
[Mkdn Forecast $]
FROM ([Ad Detail] LEFT JOIN INTREPIDD_SKUMSTR ON [Ad Detail].[SKU #] =
INTREPIDD_SKUMSTR.SRS_SKU) LEFT JOIN INTREPIDD_DEPTTBL ON
INTREPIDD_SKUMSTR.SRS_DEPT = INTREPIDD_DEPTTBL.SRS_DEPT
WHERE ((([Ad Detail].[Ad Date])=[Which Ad Date? Format must be mmddyy])
AND
(([Ad Detail].Division)=[What Division?]))
ORDER BY [Ad Detail].[Ad Date], [Ad Detail].Division,
INTREPIDD_SKUMSTR.SRS_DEPT, INTREPIDD_SKUMSTR.SRS_CLASS, [Ad Detail].[SKU
#];


I'm puzzled. I don't see any reason why that query wouldn't do the
"autolookup" that comes in so handy. A test query that I made, which also
involves two left joins in a similar fashion, works fine in Access 2007;
likewise a form that I based on the query.

Would you be interested in sending me a copy of your database to look at?
If so, you can send it to the address derived by removing NO SPAM and
".invalid" from the reply address of this message. If that address isn't
visible to you, you can get my address from my web site, which is listed in
my sig. Do *not* post my real address in the newsgroup -- I don't want to
be buried in spam and viruses. It would be best if you could make a
cut-down copy of the database, containing just the elements necessary to
demonstrate the problem, compact the copy, and and zip it for sending.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top