Results 1 to 4 of 4

Thread: vb/access code

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Location
    Petersfield, UK
    Posts
    1,755
    Thanks
    0
    Thanked
    0 times in 0 posts

    vb/access code

    lo all.

    Have to do some access programming for computing. In Access i want to click on a record button (e.g. to take me to previous records)

    I want some code that checks that all the box in the form have data in.

    Can anyone help me with this?

    I though something along the lines of:
    if "customer" = null then msgbox"you missed some data! - in customer"

    *customer being the field.

    Thanks all
    Will
    | XP1600-m | ASUS AN78X Deluxe | r9700 pro | 2x512mb pc37000 |

  2. #2
    Senior Member Shad's Avatar
    Join Date
    Jul 2003
    Location
    In front
    Posts
    2,782
    Thanks
    23
    Thanked
    42 times in 25 posts
    Set the fields to not allow for null entries and Access will prompt you.
    Simon


  3. #3
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb
    well. i havent tried it, but i would've thought something like...

    OnLostFocus of the particular field (or make it run on the command button?)

    if customer.caption = ""
    then msgbox"you missed out some information"
    customer.getfocus

    well something like that? go fiddle

    mark


    edit : or shads way would work too.. arg, always choosing the hard route..

  4. #4
    Senior Member
    Join Date
    Jul 2003
    Location
    Petersfield, UK
    Posts
    1,755
    Thanks
    0
    Thanked
    0 times in 0 posts
    Its just that for teh gay computing A2 project (that this is) we have to use lots of programming to get good marks. (Me and streetster prolly will be posting lots and lots in the near future )

    Anyway, i want to look like i know what i am doing with vb so thought i coudl program it to check at the end and look more impressive.

    Will

    (ty for the help btw)
    | XP1600-m | ASUS AN78X Deluxe | r9700 pro | 2x512mb pc37000 |

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •