Code for checking that all fields on a SubForm has a record (based on a condition)

I have a Main Form called Brewing.
On that main form there is a Sub Form (BrewingSubFormHops), see below.
"Min" is the time in boiling wort. Figure comes from recipe
"g/l" gram/liter, is the recommended amount of Hops based on wort in boiler. Figure comes from recipe
"added" is the real amount of hops the brewer should add into the wort.
"DryHop?" Yes / No. Data comes from recipe
If the "DryHop?" is No (0 ) then the hops will be added later, weeks later, and a record in the "added" field is not
required at this moment.
If the "DryHop?" is Yes (-1) then all the fields "added" must be completed before closing the MainForm/SubForm.
Picture 1 shows the SubForm that is right.
Picture 2 shows a SubForm with one missing data in field "added". How can I avoid this by prompting the user to "remember" to complete "added" on row two?
Best // Peter Forss Stockholm and Sigtuna GMT +1.00

Your form doesn't seem to agree with your description as in the former it is the rows with a Dryhop? value of TRUE which are NULL in both examples.  I'll assume the description is the correct basis.
In the subform's BeforeUpdate event procedure validate the data as follows, setting the return value of the Cancel argument to True if the validation criteria are not satisfied:
Const MESSAGE_TEXT = "Your message text goes here."
If Me.[DryHop?] Then
    If IsNull(Me.[Min]) Or _
       IsNull(Me.[g/l]) Or _
       IsNull(Me.[added]) Then
         MsgBox MESSAGE_TEXT, vbExclamation, "Incomplete Data"
         Cancel = True
    End If
End If
If it's the form which is correct rather than the description change the first line to:
If Not Me.[DryHop?] Then
You can, and in my opinion should, also enforce this in the table definition by using an appropriate expression as the table's ValidationRule property.
From a presentational point of view would it not be better to use a check box as the Dryhop column's display control, or at least format the column as Yes/No?  Access's implementation of Boolean TRUE and FALSE values as -1 and 0 is unlikely to be evident
to most users.
Ken Sheridan, Stafford, England

Similar Messages

  • Table for checking the appended fields in the standard extractor

    Hello,
    Please let me know the table name for checking the appended fields in the standard extractor.
    Thanks in advance

    Hello,
    From Rsa6 , goto your extractor from there you may get the name of your strucutre
    Go to DD03L and enter this name
    And you get to see all the fields there..
    waiting for your feedback.
    Regards
    Nitin Bhatia

  • Badi for check tax number field

    Hi guys!
    Can anyone tell if exists a badi that ckecks the field 'TAXNUM' in transaction 'BP' after we put a value there.
    I've already check in the transaction 'Bus7' and i only find the function for the event 'check before saving' -'BUP_BUPA_EVENT_DCHCK'.
    Thanks in advance.
    Hugo.

    Hi everybody!
    I need understand how implement check of taxnum using transaction BUS3 - view BUTX01.
    I need check tax number in transaction FPP2.
    I see a post very interesting:
    Badi for check tax number field
    I create a module function but inside of module function i don't have data for my validation. I think i make a mistake. Help please!
    If somebody have a tutorial would be great!!
    Thanks!

  • Tcode for checking that file is on the server

    what is the tcode for checking that file is on the server.
    thanks...

    Hi
    AL11.
    CG3Y/CG3Z.
    Regards,
    Sree

  • T.Code for checking the total value of a material

    Hi Experts,
      Can anybody tel me the T.code for checking the total value of a material which is procured in a specified period?
    Thanks in advance
    Channa

    Refer Tcode ME80FN click on Change Veiw & select Purchase Order History with this you can get PO-GRN-INVOICE Qty & Value details
    Last button on Application tool Bar it is in line of filter, total etc icons
    Also check below reports :
    MC$G - PURCHIS: Material PurchVal Selection
    MC$0 - PURCHIS: PurchGrp PurchVal Selection
    MC$< - PURCHIS: MatGrp PurchVal Selection
    MC$4 - PURCHIS: Vendor PurchVal Selection

  • I can't download Ikea 3D kitchen planner.  It's really frustrating - a message is appearing on my mac book pro that I ned to get info and check that various files are unlocked.  I've checked that all other requirements are fulfilled, still won't download

    I can't download Ikea 3D kitchen planner.  It's really frustrating - a message is appearing on my mac book pro that I ned to get info and check that various files are unlocked.  I've checked that all other requirements are fulfilled, still won't download.  Any help very gratefully received.  Thank you.

    Hi, I'm not really very good with computers and am having the same problems when trying to install the Ikea 3D kitchen planner, please could you take me through the steps?
    1. Download (save) the disk image file 2020PluginInstaller.dmg
    I double click on the link which says "Install 3D Planner"
    I agree to the t&cs
    A file downloads to my download folder called 2020PluginInstaller_IKEA.dmg
    2. Mount the disk image (open/run the downloaded file) if not mounted automatically
    I double click on the downloaded file
    3. Find the 2020PluginInstaller window (might be behind the window on top)
    A small window opens up with a lego brick called 2020PluginInstaller_IKEA.dmg and a folder called Internet plug ins.  I highlight the lego brick and do File, Get info and unlock it
    4. Drag the lego piece to the folder (if you do not have admin privileges you will be prompted to authenticate)
    I do this and put in a password to authenticate
    5. Restart the browser (it is not enough to close the browser window, you need to restart the browser
    application)
    I've tried restarting Safari, I've tried re-starting the computer
    6. Access the same link and you will now see the Start button and be able to start planning your room!"
    When I go back to the IKEA kitchen planner I don't see a start button, I just see the exact same screen as before prompting me to install the 3D planner
    Please can you help?

  • User Exit for checking Purchase Requisitioner Field in CJ20N Transaction

    Hi,
    I want user Exit for checking Purchase Requisitioner field while making PR through CJ20N transaction. I have trie EXIT_SAPLEBND_001 user exit. Problem in this user exit is I am not getting Purchase Requisitioner No & Item No in I_CEBAN
    structure.
    Please suggest what to do ?
    Regard's
    Shabbir

    Hi,
    You can check with this BADI ME_PROCESS_REQ_CUST. 
    Kindly refer below mentioned link for further details:
    Badi ME_REQ_POSTED  For CJ20N Transaction
    Hope this will help you.
    Regards,
    Mudita

  • HT1860 my apple tv (1st gen) has worked fine for a year/ All of a sudden it has stopped displaying any movies or tv. It only displays my movies or my tv that has been previously down loaded. however it appears connected wirelessly with good strenght. Any

    my apple tv (1st gen) has worked fine for a year/ All of a sudden it has stopped displaying any movies or tv. It only displays my movies or my tv that has been previously down loaded. however it appears connected wirelessly with good signal strength. Have tired swithing off both router and apple TV. Any ideas?

    This is a known, ans ongoing issue. Rest assured you're not the only one affected. There are several threads here already discussing this, I suggest searhing them out if you want more details, and possible work-arounds for locally hosted content.

  • NSS4100 RAID DOES NOT START Please check that all components are present

    Hi, The NSS4100 storage system failed to start the raid10.
    The message is:
    Failed to start RAID
    Please check that all components are present
    All the disks are present as you can see in the attached image.The system has been restarted twice. Is there a possibility to start again the raid without losing data?
    Thank you,Dan

    Hi.
    I have exactly the same problem which is discribed first in this Thread.
    We have a NSS 4000.
    4 HDs - RAID 5
    SATA 2 was faulty an the RAID was degraded
    There was no problem with the data on the Volumes. I pulled the disk on SATA 2 (which was the one which no longer was in the RAID). Ich pushed it in again. Then on RAID site i clicked on 'Edit' and then on 'Add'. I thought the RAID would then synchronize the fourth HD and the status is going to be 'Running' and we are safe of one harddisk failiure.
    Log:
    2010-01-04 13:04:49 RAIDA : Rebuild Finished
    2010-01-04 13:04:46 RAIDA has failed.
    2010-01-04 13:04:46 RAIDA has suffered a drive failure.
    2010-01-04 11:27:15 RAIDA : Rebuild Started
    While the process was synchronizing i could access the data on the Volumes.
    But after 90 min the RAID was broken. No Access on the data - no shares. The Status is 'Stopped'. All 4 HDs are Online and the Health Status is 'Passed'
    If i click on Start:  "Failed to start raid. Please check that all components are present."
    I have no saved configuration because i thought that there will be no problem with this 'basic procedure' of a RAID device.
    Even if the HD is broken the RAID should be doing his job in 'Degraded' mode. Thats because i am using a RAID.
    So am i right that our data is gone because only one HD from a RAID 5 seems to be broken?

  • How to check  if all values from a dataset  has come to  an internal table

    How to check  if all values from a dataset  has come to  an internal table ?

    Hi,
    After OPEN DATASET statement check if sy-subrc = 0 if its success then proceed with split statement and save the dataset values into a internal table and while debugging the internal table you will find that whether all values get into internal table.
    Checking sy-subrc after OPEN DATASET statement is must to fill up the values in the internal table.
    For e.g.
    OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        WRITE :/ 'No such input file' .
        EXIT.
      ELSE.
    READ DATASET p_inpfile INTO loc_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            CLEAR loc2.
    *Spliting fields in the file-
            REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
           SPLIT wa_string AT const INTO loc2-pernr
                                           loc2-werks
                                           loc2-persk 
                                           loc2-vdsk1.
    Hope you get some idea.
    Thanks,
    Sakthi C

  • HT1848 my ipod will not update.  I have plugged it into itunes and authorizing the computer but, it still says that all of the purchased product has not been transfered.

    my ipod will not update.  I have plugged it into itunes and authorizing the computer but, it still says that all of the purchased product has not been transfered.  It keeps telling me to authorize the computer which I have done.  The purchased items were purchased using an $10 gift card, would that have anything to do with it?
    Thanks,

    We won't know until you try the procedure.   The reset will not affect the content of the iPod.
    Stedman

  • Need help with API and sample code for checking a user's rights on a folder

    Hi All,
    I am working on an UCM integration where user supplies a folderpath (ucm folders), and a file is later uploaded to this location.
    Since a user can provide a folderpath where he has only Read Access or no access at all, we are trying to work out a way to pre-check his permissions on the folder.
    Since we have Entity Security enabled, we have 5 security fields to rely on Account, Security Group, User Access List, Group Access List, Role Access List.
    Writing custom code for this security check is second on our agenda.
    Firstly, we wish to know the API and sample code that typically performs this Security Check in UCM.
    We could find intradoc.shared.SecurityUtils which has methods to check security on SGroup and Account, but we couldn't find anything for:
    1) Overall security check
    2) ACL security check on top of sgroup and account security check

    Any ideas anyone?!
    I am looking forward to some pointers here. :(

  • Adobe forms-checking that required fields are completed-Java Script

    I have inserted two Java Scripts into my form--one for checking for required fields are completed, and then one for generating an email pulling a custom subject line, as shown below:
    var emptyFields = [];
    for (var i=0; i<this.numFields; i++) {
         var f= this.getField(this.getNthFieldName(i));
         if (f.type!="button" && f.required && f.display==display.visible) {
              if ((f.type=="text" && f.value=="") || (f.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name);
    if (emptyFields.length>0) {
         app.alert("Error! You must fill in the following fields:\n" + emptyFields.join("\n"));
    this.mailDoc({bUI:false,cTo:"[email protected],[email protected],[email protected]",cSubject:"Bugzilla Form for: "+this.getField("Bugzilla Title").value+" - "+this.getField("Bugzilla ID").value})
    Issue: After the error window displays fields that have not been completed, when I click OK the email window displays.
    QUESTION: How can I stop the email window from displaying until all fields are completed?
    THANKS!

    Thank you so much for your quick response (and thank you for all the code that I am reusing!) I have another issue now.Can you see why the following is occurring....
    I placed else in and now it edits the required fields, but once they are completed, will not initiate the email prompt. Here's what I have now
    var emptyFields = [];
    for (var i=0; i<this.numFields; i++) {
         var f= this.getField(this.getNthFieldName(i));
         if (f.type!="button" && f.required && f.display==display.visible) {
              if ((f.type=="text" && f.value=="") || (f.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name);
    if (emptyFields.length>0) {
         app.alert("Error! You must fill in the following fields:\n" + emptyFields.join("\n"));
    elsethis.mailDoc({bUI:false,cTo:"[email protected],[email protected],[email protected]",cSubject:"Bugzilla Form for: "+this.getField("Bugzilla Title").value+" - "+this.getField("Bugzilla ID").value})

  • How to access source code for checked in .sca files in the dev environment

    Hello,
    I am trying to do some CRM E-commerce development. The basis personnel has checked in all the relevant SCA archives listed in the setup documentation.  He has since given me the Servername and port for accessing the NWDI that I can set in the Development Environment. I can log on to the system and see the repository browser with all the branches.
    For example:
       CustomerConfig -> CRMEXT -> sap.com_SAP-CRMWEB -> dev -> active
    CustomerConfig -> CRMEXT -> sap.com_SAP-CRMWEB -> dev -> inactive
    How ever there is no code there to sync. Is there something missing in our setup for the NWDI so I can sync the CRM E commerce projects to the local system and modify them.
    Is there anything we have to do either in NWDI or in the IDE to see the source code to extend it.
    Thank You for your help in this matter.
    Sumit.

    Hey Pascal, Thanks for the help. We did a batch check in and the code did not go through. After we tried the check-in in the non-batch  mode it worked.

  • Need code for calculation of amount field(DMBTR)of BSEG table conditionally

    Hi all,
    I am selecting data for fields belnr(A/c doc.), dmbtr(Amount), hkont(G/L acc) from  bseg cluster table giving the particular value for hkont in the selection screen.now there are some records fetched out of which there are few records in which same A/c no.(belnr) .So my requirement is to collect those same belnr records and do following calculation:
    1. suppose for some record of same belnr , if all the value for field SHKZG is 'H' then summing up the values of field DMBTR.
    2. suppose for some record of same belnr , if few value for the field SHKZG is 'H'  and few are 'S' then the                                  (summation the values of field DMBTR for all 'H' in field SHKZG  -summation the values of field DMBTR for all 'S') and both the case the single record will fetched with belnr, sum(DMBTR) according to the condition, and hkont. Please provide me the reqd. code for the above problem.Thanks in advance.
    regards
    Anand.

    Hi Anand,
    We can do like this.
    This will take into account 'S', 'H' (debit/credit indicator) and BELNR wise sum.
    1. Create new internal table, STAB with only two fields. (with header line)
        BELNR    "<------- refer below statement
        HKONT    "<------ Whatever unique combination of field(s) you want, you can put here 1,2, 
        DMBTR    "<----
    Numeric field
    If you want only HKONT wise SUM, then remove BELNR
    2. Now write this code.
    Loop at Itab.
    Clear STAB.
    IF ITAB-SHKZG = 'H'.
    STAB-DMBTR = ITAB-DMBTR.
    else.
    STAB-DMBTR =  - ITAB-DMBTR. "<----- Negative Sign
    endif.
    STAB-BELNR = ITAB-BELNR.
    STAB-HKONT = ITAB-HKONT.
    COLLECT STAB. "<------ Important.
    Endloop
    Note:
    Based upon the alphanumeric fields combination (BELNR and HKONT), the sum will be done.
    Similar to group by in a select query
    regards,
    amit m.
    Edited by: Amit Mittal on Jan 22, 2010 2:14 PM

Maybe you are looking for

  • Apple loop not responding to tempo changes

    apple loops that have been created from an audio file in the arrange window do not respond to tempo changes. when i had logic 7 there would be a change in the audio file from an audio to an apple loop icon. this is not happening w/ logic 8 although i

  • How to map bapimtcs-data to bapimatmra ?

    Hello friends, In order to implement the user exit z_uexit_material_vtl_status mentioned in Note Nr. 623026, I need a function which can convert (or map) bapimtcs-data to bapimatmra. This is necessary beacuse the standart code includes lines which co

  • Error When Creating OR Rebuilding Oracle Text index using Lexer Keyword

    Hi All, I am getting following error when i creating oracle text index using lexer & stoplist keyword. Pls Help me if any body know. Thanks in Advance. Error starting at line 1 in command: CREATE INDEX TXT_INX_TEXT_SEARCH ON TEXT_SEARCH (BFILE_DOC) P

  • How can I launch the Preinstalled Partition for my Satellite M200-E411?

    I have a Toshiba Notebook Satellite M200-E411, I'm having trouble with the current OS, but I know that my laptop has a Preinstalled Partition for receovery the original OS. But I don't know which function key to press when the computer start up. Can

  • Pavilion dv7-2273cl - "Unknown Device" on Other Devices

    Its been 1 month since i bought my Entertainment Notebook and I can't figure it out, why does it have a Unknown Device listed on the Device Manager under Other Devices. Can someone tell me how to discover it?