Results 1 to 7 of 7
  1. #1
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62

    Trying to write a simplet vba code

    Hi all im trying to write a code based on a form control.



    what im after is if stage_code_complete is left blank ie you enter the cell but dont enter any information the code will not run

    but if you enter data which is a combobox then you will be tabbed to control nrd_finding and you must enter a reason, if you try to exit then a msgbox stating information required.

    Any help would be great

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you put your code in the stage_code_complete control AfterUpdate event?

  3. #3
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    Sorry Ruralguy, i probable explained wrong i havent wrote a code, i want to learn to write a code which does the above, i know what i want it to do, im just not sure do to do it, if theres any sites that could give me the help im happy to read up on it, just trying to get a point in the right direction

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I think Crystal's site is a good place to start.
    http://www.accessmvp.com/strive4peace/
    Can I delete the other thread?

  5. #5
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    yes please.

  6. #6
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    im still not getting the hang of this, can anyone help me write the code.

    i want an afterupdate if (stage code complete) is not null to then go to control (nrd finding) and force user to select something from the combobox

    Please help anyone many thanks

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    You might want to show us what you have and what you have tried.
    If you post your database, please use an mdb.

    This free video tutorial,or others at Datapig, may be helpful
    http://www.datapigtechnologies.com/f...econtrols.html

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Write Code to Navigate from Subform to Subform
    By Swilliams987 in forum Programming
    Replies: 22
    Last Post: 02-04-2011, 11:30 AM
  2. Some Can Read; Some Can Write
    By cassidym in forum Security
    Replies: 3
    Last Post: 08-19-2010, 02:19 PM
  3. How Do I Write This Query?
    By TxTcher in forum Forms
    Replies: 8
    Last Post: 08-13-2010, 01:50 PM
  4. ADO.Recordset - Write
    By Marvin in forum Programming
    Replies: 0
    Last Post: 07-17-2009, 07:56 AM
  5. write a query how to???
    By flamingo in forum Queries
    Replies: 0
    Last Post: 01-13-2009, 03:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums