Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / December 2007

Tip: Looking for answers? Try searching our database.

Refreshing a field, not an entire form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sandy - 15 Dec 2007 21:31 GMT
Hello -

I have a form with several required fields.

I want to be able to refresh the data in one dropdown field on GotFocus,
based on the data in another dropdown field.

DD Field 1 is called categories
Cat_ID    Category
1    Accommodation
2    Agriculture, Forestry and Fishing
3    Animals and Pets

DD Field 2 is called Sub-Categories
CatID    Sub Category
1    Bed and Breakfast
1    Camping and Caravans
1    Hostels

the row source for the Sub-Categories field is:

SELECT SubCategories.[Sub Category], SubCategories.CatID
FROM Categories INNER JOIN SubCategories ON Categories.Cat_ID =
SubCategories.CatID
WHERE (((SubCategories.CatID)=[Forms]![Listing Form].[category]))
ORDER BY SubCategories.[Sub Category];

When the data in the Category field changes, how do I set the refresh on the
Sub-Category field only and not the form? Since all the fields are not
entered yet I get an error for the empty required fields.

thank you
sandra
Sandy - 15 Dec 2007 21:47 GMT
I got it -

[Forms]![Listing Form]![Sub Category].Requery

sorry for having a slow brain today :-)

> Hello -
>
[quoted text clipped - 29 lines]
> thank you
> sandra
Beetle - 15 Dec 2007 21:51 GMT
In the AfterUpdate event of your categories combo box put;

Me![sub categories].Requery

HTH
Signature

_________

Sean Bailey

> Hello -
>
[quoted text clipped - 29 lines]
> thank you
> sandra
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.