Refreshing a field, not an entire form

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
0
Utf
12/15/2007 9:31:00 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
712 Views

Similar Articles

[PageSpeed] 9

I got it - 

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

sorry for having a slow brain today :-)

"Sandy" wrote:

> 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
0
Utf
12/15/2007 9:47:01 PM
In the AfterUpdate event of your categories combo box put;

Me![sub categories].Requery

HTH
-- 
_________

Sean Bailey


"Sandy" wrote:

> 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
0
Utf
12/15/2007 9:51:06 PM
Reply:

Similar Artilces:

Merging List w/ a Form
Can anyone assist me with merging a form created in Excel with a database (or list) also created in Excel? I know how to merge an Excel worksheet to be used as a database for Word in the Mail Merge command, but my FORM, with which I am trying to merge my database, was created in Excel and needs to remain under its format (not be converted to Word). I am filtering the information I need from the database to be imported to the Excel Form. Any help would be appreciated. Thank-you. If you're trying to display information from one record in the database, there are sample files here...

Help creating a script in SQL or Calculated field in Crystal
How do I take this script and manipulate it to give me one long string with static text as well as SQL data in specific positions within the string. Example result: Positions / Data: 1-3 / 173 (Static text) 4-6 / spaces 7-10 / "X_UPR30300"."YEAR1", (has to show up as 2007. Showing up as 2,007) 11 / 4 (Static text) 12-22 / "UPR00100"."SOCSCNUM" 23-57 / "UPR00100"."LASTNAME" 58-92 / "UPR00100"."FRSTNAME" 93 / "UPR00100"."MIDLNAME" 94-120 / "UPR00102"."ADDRESS1" 121-148 / &q...

macro for comparing fields in two work books
Hello, I have two excel spread sheets (say A1 & A2). A1- is the master sprea sheet and A2 is smaller spread sheet with very few details. Suppose Column B in A2 has 100 partnumbers and Column C in A1 has th superset of partumbers (1000) and corresponding details for each par number, I need to: 1. Check if all the 100 part numbers in A2 has a corresponding match i A1 2. Extract the info for the matched partnumbers from A1 and list in seprate sheet. 3. Even if there in no match A1, let's say for 40 of them, it shoul still list those parts in the new sheet. Can anybody help me with t...

Does Multi-Field Index Work For Date/Time Values Only
I created a MS-Access DB table with the following 3 columns: ColID - PRIMARY KEY Col1 - Number Col2 - Date/Time Next I created a multi-field index using Col1 & Col2. I entered the following row in the 1st row: 1 5/10/2007 Next when I tried to add the above row again, as expected, I wasn't allowed to enter the same row. Next I entered the following 2 rows: 1 5/11/2007 2 5/10/2007 Both the rows were accepted. After this I deleted the 3 records, went back to the design view & changed the data type of Col2 from Date/Time to Number keeping the multi-field index...

dynamic field content of parameter combobox
Greetings, I have to filter my Crystal 9.0 report with a parameter combobox field in Microsoft CRM. The data for this parameter field has to be loaded out of a database field dynamically. I have found the possibility to load database field values in a parameter field but this will not be dynamically. If there is a change in the database content the parameter field content will not be updated. I hope to create a combobox control is no problem. Is there a way to turn this into reality? Thanks for your help Thomas Ott (ITVT germany) ...

Deleting a single character in a text field
In one of my tables i have a field that has a text values like '123.23123' i would like , to delete the full stop. How can i do this. I cant do it in excel as the number of records that i have is over 200000. hi, ma1000 wrote: > In one of my tables i have a field that has a text values like '123.23123' i > would like , to delete the full stop. How can i do this. I cant do it in > excel as the number of records that i have is over 200000. Create a update query, use Replace([yourField], ".", "") as new value. mfG --> stefan <-- ...

Filter Report by Form
I'm using the following code from the wonderful Allen Browne which works perfectly in an either or scenario (either by Start/End Date(s) OR filtering by client name; but I don't know what syntax to use to filter by Start/End date(s) AND anything typed in the client name field. I'm sure it's easy but I can't get my head around it. I appreciate any and all assistance!! Private Sub cmdPreview_Click() 'On Error GoTo Err_Handler 'Remove the single quote from start of this line once you have it working. 'Purpose: Filter a report to a date r...

Validating two fields
I am trying to create a database in which some of the fields should be mandatory only under certain conditions. For example: In my "Type of Injury" column, I want the user to be required to enter a value in this column, only if the value in the "Type of Document" column is "Nursing Report". Is this possible? I am only just beginning to teach myself Access, so please bear with me. Thank you. Put a validation rule on the *table* (not field.) 2nd example under the the Validation Rules for Tables section here: http://allenbrowne.com/Validati...

Adding Fields and Tables to MSCRM
Is there a link or some reference on the ability to add fields to existing tables in the CRM database and/or adding complete tables to the CRM database?? I am asking this from the point of view relating to other existing CRM products (saleslogix, frontrange - shh). From what I have played with so far from playing with my SBS2k/MSCRM install is I my need to have a MS developer skillset. Robb, Using the schema manager in the deployment Manager MMC snap-in, you can add fields to the existing tables. However, there is no way to add new tables. Matt "Robb D" <robbd@eproductscons...

Macro to open print window and set to print entire workbook
I need help getitng a macro created to open the print window, then se it to 'print the entire workbook'. Then the macro would stop. At whic the user would then specify additional specs for printing. I.E. # o pages, paper size etc. I am trying to default the 'print entire work book option' withou restricting the user from other print specs. I have a macro that will print once a button is clicked on th spreadsheet but it goes directly to print and does not let the user se other specs. I.E. # of pages, etc. Thanks in advanc -- retseor ---------------------------------------...

Button on Form to Run Report based on Query with Parameters
Hi Guys. I am busy working on a stock control database (and job control). When I have a Form Open, it shows several fields, including JobID (Which is the PK for that job) (frm_Invoicing) I also have a Query that when Run, it prompts for the JobIDNo. (qry_CustJobsInvStock) I have a report based on that query. (rpt_CustJobsInvStock) I have added a button onto the form (onclick -> DoCmd.OpenReport) to open and automatically print the report, But I just cannot figure out how to get it to get my JobID from the form, and to Automatically add it as a Parameter for the que...

Center Access2007 Form in the middle of access Main Window
Thank You Is there any easy way to center access 2007 forms in the middle of the screen (Monitor) or access main window. and give me good result Hello, I think there is no built in feature to achieve this goal. You may need to create a new form and configure it as the main window. You could enumerate forms and create buttons etc to open forms from this main form. For example, you could use hte following code enumerate forms in your database: Dim db As Database Set db = CurrentDb Set cntContainer = db.Containers("Forms") For Each doc In cntContainer.Documents Str...

Office2003 autoformats my ENTIRE document, and the file size is HU
Hi everyone I have recently ungraded to Office2003. It's great, with the exception of a problem i appear to be having with Word. I have a 22 page doc, that started out at a mere 100K. Everytime i try and make a style change (increase font, bold, align, add bullets) word then applied that new style to my ENTIRE document, ie: adding a bullet to one line, adds a bullet to every single line in my doc. Every line in the doc gets reformated. If i then go ctrl-z to undo the applied style, all the incorrectly applied styles all correctly removed, and i am left with just my one style - ...

I'm trying to display the next month in a text field
Hi there, I've gone through all the forms and can't seem to get the code straight for displaying the next month on a text field on my form. I just want the entire month name and nothing else and I have been struggling with: DateSerial(Year(Date()), Month(Date()) + 1, 1) but its showing the day and year too and thats not what I need. Thanks in advance! GM gmazza wrote: >Hi there, >I've gone through all the forms and can't seem to get the code straight for >displaying the next month on a text field on my form. >I just want the entire month name and nothing else...

Printout Method
In building a form to allow users to print a "blank form" I've constructed as an Access Report, I'd like the user to be able to select the number of copies to print. It looks like the PrintOut Method would be a good choice for this, but I'm not smart enough to know quite how to get the "Copies" argument to get its input from the textbox on my form, where the user will enter the number of copies they'd like to print. Suggestions? -- Thanks, Croy Does the report have a record source? -- Duane Hookom Microsoft Access MVP If I have helped you, please help...

Mail (outlook 2002), 'To' field, general question
Why do some names of some messages in the 'To' Field appear with single quotes in my Sent Box? I'm using Outlook 2002. I'm sure there's an easy explanation but it stumps me. ...

Changing the names of fields in tables after creating other object
I just leaned about the naming conventions after I have created my tables, reports and several queries. Can I change the name of fields in my tables (to remove the spaces and give them unique names ie not just last name but childlastname) without destroying the work I have done in queries, reports, and forms. Mary -- Positive Direction for Youth & Families, Inc. (www.pdfyinc.com) Possibly. If you are using a newer version of Access, say 2003 or 2007 AND you have Name Autocorrect, and all it's options, enabled, it MIGHT work. I found it somewhat buggy. Before you...

extracting numbers from a text field and applying formula
here's my question... i have a cell that has a text field of this type: '9-19' (a-b) I want to create a formula that will subtract 19-9 (b-a) and return the result as a number// can anyone help?! is this even doable? I'd really appreciate it! PS also, i'm very fairly new at excel so a detailed response with th formula would really help! ALe ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Try: =MID(A1,FIND("-",A1)+1,99)-LEFT(A1,FIND("...

email form script to show email adresses of all recipients
I see there is a field in the attributes called torecipients but I cannot add it to the email form. Is there a way I can script this into the email form to show the email addresses of all of the recipients. My idea involved creting a new attribute called all_recipients and adding it to the form then doing a onchange for each of the to, cc, and bcc fields to update all_recipients. SO far it doesnt work. All the field returns is "undefined". Any help is greatly appreciated!!! ...

Fill Form And Get $5000 To Your Home.
Fill Form And Get $5000 To Your Home At http://ukcitygirls.co.cc Due to high security risks,i have hidden the cheque link in an image. in that website on left side below search box, click on image and enter your name and address where you want to receive your cheque. please don't tell to anyone. ...

Problems with add new field
Hi I want add new field to the opportunityproduct object but I get the follow Error in the Eventlog. dmLog: Failed to grant access to the regenerated view OpportunityProduct after inserting new attribute 'attributename' Source: DMSAPIN I'm login as local administrator with crmroll 'systemadmin'. Note, in other object's I can add new fields. Why I get these Error and how can I solve it? thanks Harald ...

Do all fields have "onchange" event script blocks??
Hi, I was wondering if there are onchange event handlers for all fields in CRM? I need to automatically send an email from CRM when the "statuscode" of an Incident changes to "Closed", which is a value that I added to the schema. I have seen onchange script blocks in other objects like the Contact object for the "accountrolecode" field, but there doesn't seem to be one for the "statuscode" field in the incident object? Have I got this wrong, or do not all drop down lists have "onchange" event handling script blocks?? Thanks in advance,...

Updated records in forms
Each record in a form is a work order. School, contractor, days of work, etc. I have a pop up calendar to select a week ending date for each record. Record 1's week ending date is Nov 13, 2009. Record 2's week ending date is Nov 20, 2009. When I change the date in record 2, it's changing the date in record 1. Each record's week ending date become all records' week ending date? Can I use a pop up calendar in a record and be able to retain the correct week ending date for each record. If so, how would I be able to accomplish this? Thanks for your inp...

requery subform from sub form
Thank you how can i requery subform from subform ? "a" <youb@hotmail.com> wrote in message news:%23R9c$8tSIHA.2000@TK2MSFTNGP05.phx.gbl... > Thank you > how can i requery subform from subform ? Me.Parent!Subform2ControlName.Form.ReQuery thank you the work correctly "Stuart McCall" <smccall@myunrealbox.com> wrote in message news:fl83eg$3o6$1$8300dec7@news.demon.co.uk... > "a" <youb@hotmail.com> wrote in message > news:%23R9c$8tSIHA.2000@TK2MSFTNGP05.phx.gbl... >> Thank you >> how can i requery subform from subfo...

mobilephone field
Hi, Anybody have idea why mobilephone field for lead object has max length 20, but same field for contact object has max length 50? Is it a bug? Renatas. without checking it sounds more like a simple design flaw ie someone forgot to make both fields the same length -- John O'Donnell Microsoft CRM MVP http://www.microsoft.com/BusinessSolutions/Community/CRMFaqLanding.aspx "Renatas" <Renatas@discussions.microsoft.com> wrote in message news:05EFAFF4-E5AA-4E83-B733-B3AD61BC10B4@microsoft.com... > Hi, > > Anybody have idea why mobilephone field for lead object...