Ho to make one field required based on critera of another field?

I'm creating a form and need to make the "comments" field required if the 
"code" field is =>20. I appreciate suggestions! Deadline Monster is lurking!

User enters the job processing endcode value (numeric) into the "code" 
field. If the endcode is =>20, comments are required. 

(P.S. I don't know VB) 

Thanks!
Star

0
StarT
4/4/2007 2:48:53 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
2036 Views

Similar Articles

[PageSpeed] 35

You would put your validation code in the Form's BeforeUpdate event.

If Me.EndCode >19 Then
   If Len(Me.Comments & "") = 0 Then
      MsgBox "Comments are required"
      Cancel = True
   End If
End If

...using *your* control names of course.  Post back if you need additional
assistance.

StarT wrote:
>I'm creating a form and need to make the "comments" field required if the 
>"code" field is =>20. I appreciate suggestions! Deadline Monster is lurking!
>
>User enters the job processing endcode value (numeric) into the "code" 
>field. If the endcode is =>20, comments are required. 
>
>(P.S. I don't know VB) 
>
>Thanks!
>Star

-- 
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200704/1

0
ruralguy
4/4/2007 3:12:55 PM
Answered in another group where you posted this q.
0
Allen
4/4/2007 3:13:31 PM
Reply:

Similar Artilces:

yet another resource editting thread
I need to edit resources at runtime (i.e. the string table, menus, and dialog control sizes). I would like to use the BeginUpdateResource, UpdateResource, and EndUpdateResource functions. One of the problems I have is this: If I load the menu from file with FindResource, LoadResource, LockResource, I have the binary menu data, and I can't really manipulate raw binary. If I load the menu with LoadMenu, i have a CMenu, that I can change but I don't know how to convert the final menu back to binary data that I would update with the UpdateResource command. So, how do you update? Another...

Multiple user names at one bank or brokerage
I have 3 accounts at one bank. I have 3 corresponding accounts set up in MS Money 2007. One of them is setup for online banking while the other two are not. I now want to set the other two up for online banking but I can't find a way to specify the unique login info for each of the other two accounts. ...

Inserting specific images based on product.
Hi Everyone, I'm very knew to the CRM product and was curious... For example, I am customizing a CRM interface for a company with a wide range of products. They would like to add a tab to each of their product displays showing an image of that product. I added the tab (learning how thanks to this newsgroup) but I only know how to insert a graphic using an IFRAME in the form view which in turn displays the SAME image for all product listings. Does this make sense? Basically I'm asking...is there a way to display individual images for specific products, not strictly on the fo...

Updating Boolean Field with onChange
I am having difficulty with setting a value of a new boolean field using the OnChange scripting against a picklist. If anyone has some sample code / formatting information that I can use it would be greatly appreciated. Also, I also need to know if it is possible to stop the default value for the Revenue (isrevenuesystemcalculated) field on the opportunity form being set to "Yes" when the "Convert Lead" function is used. We can set the default value to "No" for user created Opportunities but when Convert Lead is used it seems to ignore the default value. Again, a...

instructions disppear when users begin type (text field)
Hi all, I need to customize the outlook contact form and I want to add one text field to allow users to add details info and instruct users how to add. Instructions shows in the field and the instructions disappear when users click and begin to type. How should I do this? exchange 2003/outlook2003 Thank you. It's hard for me to visualize exactly what you're expecting to happen. If you want the instructions to stay on the screen, you could display them in a label control. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumps...

When hitting reply to a message, no "Bcc:" header field appears
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: Exchange Hi. When I hit &quot;Reply&quot; or &quot;Reply All&quot; to a message in Entourage, the composition window that appears has the usual &quot;To:&quot;, &quot;Cc:&quot;, and &quot;Subject:&quot; form fields near the top, but not one for &quot;Bcc:&quot;. I've looked all over Preferences but don't see an option for this. What am I missing? <br><br>Thanks, <br><br>-c On 2/26/10 11:51 AM, cmetzler@officeforma...

inbox requires no password
When I double click on outlook on my desktop, it takes me automatically to my inbox, where I have my read messages. Problem is others use this computer, how can I make it ask for a password before any emails (old or new) at all are displayed. rit wrote: > When I double click on outlook on my desktop, it takes me automatically to my > inbox, where I have my read messages. Problem is others use this computer, > how can I make it ask for a password before any emails (old or new) at all > are displayed. Either set up new User Accounts for the other Users (if using XP or W2K) ...

XP Home SP 2 and Web based Outlook
I used to be able to flawlessly remotely access Outlook remotely using IE and SP1. However, once I installed SP2, I can longer reply to any messages. My INBOX appears correctly and I can view messages, but once I hit the REPLY icon, the message I was viewing disappears and I am returned to my INBOX rather than being able to compose a message. I upgraded to SP2 on two different computers and the same problems exists on both machines. SP2 for Windows XP includes a built-in popup stopper for Internet Explorer. Open Internet Explorer and select Tools | Internet Options | Privacy tab. Se...

Fields
I am working in an education template and want to see if there is a way to create a field that can be added to periodically to show all the courses a person takes from my instructors. I created a field named course but it is only allowing me to put one course in. How can I make the field list all the courses? Thanks, Nantika -- Enjoy every day! On Sat, 17 Apr 2010 09:18:01 -0700, Nantika <Nantika@discussions.microsoft.com> wrote: >I am working in an education template and want to see if there is a way to >create a field that can be added to periodically ...

Reports and making it look prettier: Last Name, First Name Rank
I'm trying to pretty up my report by eliminating the forced space created by having one field of the report for 'LastName', one for 'FirstName', and one for 'Rank.' The Rank isn't too huge of an issue, and if three items in one field gets to be too much, I have no problem leaving that as a side item of sorts. But, I want my report to look a bit better by putting the names together! I want the report to go to my table, pull the LastName from that column, and pair it with the matching FirstName in the column to the right. (Since it's just...

Processes Requiring Lengthy Amounts of Time
Hello: I have several clients with above average databases (sizes greater than 15 GB and up to about 40 GB). When they need to run checklinks, reconciles, and/or year end close processes, it takes forever. Depending on which process, it could take 15 to 30 each to process. That is really tough when you have a business that cannot afford that type of downtime. Now, both of the companies that I am thinking of have hardware that is well within recommended specs based on the MBS hardware recommendations. The memory does not spike to an extreme, nor does activity with the CPUs, but har...

Default value for custom field?
How can I populate a custom field with a default value? Specifically, I have a custom field "DisplayName" associated with the Quote Detail object. I want initially to populate this field with the value of the product name field when a new product is added to a quote. The user can then edit the DisplayName custom field if desired. The DisplayName custom field will be used as the product name on a Crystal Reports quote form. ...

Make a cell flash
Please help I to make cell b1 flash when it becomes greater than 5 See: http://www.cpearson.com/excel/BlinkingText.htm -- Gary's Student "Lloyd" wrote: > Please help I to make cell b1 flash when it becomes greater than 5 see response in excel.misc -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lloyd" <Lloyd@discussions.microsoft.com> wrote in message news:08B5FB85-6AAB-4B7E-ABC1-8CC8E2B61466@microsoft.com... > Please help I to make cell b1 flash when it becomes greater than 5 Thanks for the link. I ...

modify description field in reports
When I print my PO's I can make the part # field in the view report screen wider but when i print it, it defaults back to the regular size. The problem is it cuts off my part numbers on some of my long numbers. Is there a way to overcome this? you must modify the po.xml file directly. "www.choppersapparel.com" <www.choppersapparel.com@discussions.microsoft.com> wrote in message news:8B4E31D5-10A7-4A99-913D-F8F6E3BD7043@microsoft.com... > When I print my PO's I can make the part # field in the view report screen > wider but when i print it, it defaults ...

How do you change a field name in 2002 Excel
I have copied and pasted a whole database from Works into the Excel program but can't seem to find a way to change the field names from A, B, C, to what I want as Last Names, First Names, etc. Aarrrrgh. It can't be THAT difficult! <G> Using the HELP did nothing for me thus I am here asking this silly Q. AnnE in MN You cannot change the Column letters from A, B, C etc. You can choose to have column and row headers not shown under Tools>Options>View Enter your titles(names) in row 1 then select A2 and Window>Freeze Panes to lock row 1 in view. Gord Di...

Multiple indexes on same fields in different order
I sometimes need to find the largest or smallest value in a field. If I put two indexes on the same field, one in ascending order and one in descending order, is Jet smart enough to use the proper index if a give it a grouping query with the condition Max or Min, or am I just wasting resources? Pete -- This e-mail address is fake, to keep spammers and their address harvesters out of my hair. If you want to get in touch personally, I am 'pdanes' and I use yahoo mail. But please use the newsgroup when possible, so that all may benefit from the exchange of ideas. ...

Making CRM more attractive in Outlook
Hi, I'm new to this site (and MS CRM). I am preparing a presales demo and want to make the outlook (desktop) version of CRM more attractive for users by using the shortcut buttons that CRM provides. I have two questions. One is more Outlook related, really. - Can I create a new view in the navigation pane (like mail, calendar, ...) with my CRM buttons? Right now I have all these buttons under "shortcuts" but that doesn't appeal to the user. - I have once seen a demo where a view was created with all the standard shortcut buttons in a sort of "folder list",...

I cannot paste from one workbook to another. Copy works, paste do.
When I attempt to copy from one workbook and paste into another, copy appears to work but paste does not. The paste menu item is grayed out in the workbook to which I attempt to paste. Are there setting that can be changed to aloow the paste?? Check to see if either workbook and/or worksheet is protected. If so, unprotect. Then Copy/Paste should work. BTW, how are you copy?paste(ing) Tab or content? Dennis "JimmyMc" wrote: > When I attempt to copy from one workbook and paste into another, copy appears > to work but paste does not. The paste menu item is grayed out...

CTreeCtrl::DeleteAllItems requires resetting the image list, why?
If I call a CTreeCtrl's DeleteAllItems method it seems that I also have to set the controls image list again otherwise the control does nt show either the items icon or text. The following fails: m_tree.SetImageList(&someImageList, TVSIL_NORMAL); .... m_tree.DeleteAllItems(); m_tree.InsertItem(_T("Test"), 0, 1, TVI_ROOT, TVI_SORT); Where as the following works: m_tree.SetImageList(&someImageList, TVSIL_NORMAL); .... m_tree.DeleteAllItems(); m_tree.SetImageList(&someImageList, TVSIL_NORMAL); m_tree.InsertItem(_T("Test"), 0, 1, TVI_ROOT, TVI_SORT); ...

Excel2000: Strange behaviour for one cell in workbook
Hi The situation: There is a Excel workbook used for registering working time in firm departments, created earlier. The worksheets are protected, and I don't have the password, as author isn't working here anymore. The workbook is stored as read-only on network resource, and monthly every department is copying it to local computer and filling the table. The table's body has 2 rows data for every employee with 31 columns for month's dates, and several protected summary columns. For every date, working hours or some code string is entered into according cell. One of codes, and ...

Combine small documents into one master document
Hi, I currently have an "engagement letter" that is created for our clients to set the expectations for our business relationship (I work for attorneys). We have about 10 different paragraphs that may be inserted into the letter based on different factors (3rd party payor, if a retainer is required, etc.). So I start with the basic letter and then have a userform with checkboxes where you can select the text block options (stored in Autotext). When you click OK the various paragraphs are inserted at bookmarks. While this works, I find working with Autotext cumber...

Filter two columns with criterion applying to one or the other?
Hi, I am looking for a solution to the following filtering problem: I have two adjacent columns, so using a filter for both of them is no problem. But what I want to do and don't know how to do is this: I want to filter for values greater than x (a certain number, in my case 5000) in any of the two columns. I can filter both columns for x greater than 5000 but that filters out more than I want because there may be some cells with a value greater than 5000 in only one of the two columns. Is there a solution to this problem (using Excel alone or an add-on)? Peter Hi Peter you can use th...

Vlookup, multiple times in one column summing corresponding
I have a list that contains common invoice numbers that appear multipl times in column A and need to use the vlookup function to find and su the corresponding amounts in column B. As you would be aware the following vlookup functio =VLOOKUP(A3,DATA,2,FALSE) will only return the one amount once i reaches a match and I need it to continue down the column and sum al matching invoice numbers. Column A Column B 145768 356.87 145769 678.90 145880 80.87 * 145769 103.55 145770 56.90 145769 78.32 145880 54.09 * The answer I�m looking to return is 145880 134.96 It has to be a vlookup sty...

One front-end server multiple back-end servers
Hi, I was wondering if someone could help with the following scenerio and make some suggestions as to an answer. We have 3 exchange AG groups. 1 AG group has 3 exchange servers in it, each located in it's own AD domain. 1 AG group has one exchange server in it, it's in its own AD domain. Thirdly, the last AG group has 2 exchange servers in it, both are in the same AD domain. 1 of these 2 exchange servers in the final AG mentioned is a front-end server, that should be supporting all the exchange back-end servers. The problem we are facing is that when a user from any of the ...

Is batch ID is required in payables transaction entry form?
Is batch ID is required in payables transaction entry form? How about if I just have 1 invoice and do not want to create a batch for it? can I still process the invoice? Hi Bab, A batch i.d. number is not required. You have to post your invoice both in the Payables module and also in the Financial module. I check weekly for any "series batches" that have not been posted in my A/P, A/R, P/R, and Financial modules. If they go unposted it can create havoc. I hope this has been helpful to you. -- Diana "Bab" wrote: > Is batch ID is required in payables transa...