Kevin Waddle
thewaddles at sbcglobal.net
Sun Oct 10 00:31:25 CDT 2004
Augusta, Please excuse the length of this reply...it took much longer to explain than it would to accomplish. You can solve the Check Box problem and you data normalization problem in the manner listed below. If you have a TextBox to hold the reason for restriction there is nothing to prevent User1 from entering "Because he's broke" and User2 entering "He gots no money". The same reason but not way to determine how many customers are broke from this data. You need a ComboBox listing all the reasons Example: 1. Create a table named tblRestrictions 1.1. Add two fields to the table; RestrictionID as an AutoNumber and ReasonForRestriction as a Text field 1.2. Close the table and enter into the table all the reasons that contributions could be restricted. Your first reason should be something like N/A or No 2. Open your main table in design mode and add a field in your main table named ContibutionsRestricted 2.1. From the Data Type as dropdown select LookUp Wizard 2.2. A dialog box will appear; Select "I want the lookup column to lookup the values in a table or query" 2.3. Click Next, then select tblRestrictions from the list. 2.4. Click Next, then select ReasonForRestriction from the list and click the > button 2.5. Click Next, then the dialog will allow you to sort the ReasonForRestriction by the AutoNumber or text 2.6. Click Next, then the dialog will show you the data selected and a checkbox titled "Hide Key Column (Recommended)" leave this checked 2.7. Click Next, then the dialog will ask you for a name for your new field 2.8. Click Finish 3. You will be back at the Design View with a Popup saying "The table must be saved before relationships can be created, Save Now?" Yes / No, Click Yes 4. Your new field, ContibutionsRestricted, shows in your table with a data type of Number. You have just created a One-to-Many relationship between the RestrictionID field in the table tblRestrictions (One Side) and the ContibutionsRestricted field (Many Side) in the main table. What is actually stored in the main table is the number that corresponds to the ReasonForRestriction from the table tblRestrictions. If you add this field to a form it will be a ComboBox from which you can select your reasons. In your form design you can set the "Default Value" property to 1 so that any new customers will default to N/A Hope this helps, Kevin -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of augusta Sent: Tuesday, October 05, 2004 1:00 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] fill in x field if y field is checked I need to know how to make a field required if another field is checked. For example: If the contributions are restricted, then fill in the restricted reason. Can anyone help - in plain English? Thanks Augusta -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.775 / Virus Database: 522 - Release Date: 10/8/2004