Results 1 to 4 of 4

Thread: Anyone good at Access?

  1. #1
    boop, got your nose stevie lee's Avatar
    Join Date
    Sep 2007
    Location
    southport
    Posts
    2,670
    Thanks
    414
    Thanked
    422 times in 318 posts
    • stevie lee's system
      • Motherboard:
      • ASUS ROG STRIX B450-F Gaming
      • CPU:
      • Ryzen 3600 (stock cooler)
      • Memory:
      • 16 GB Corsair 3600 MHZ Cas 18
      • Storage:
      • Crucial 250GB BX500, Hitachi 640GB + 1TB. WDblue 2TB, Crucial M500 240GB
      • Graphics card(s):
      • sapphire 7700
      • PSU:
      • bluestorm II 400w
      • Case:
      • Xigmatech Midgard
      • Operating System:
      • Win 10 Home
      • Monitor(s):
      • 22" Samsung SM2233BW
      • Internet:
      • 20mb plusnet unlimited!

    Anyone good at Access?

    im creating a database of all of shopmobilities vehicles, for use in the workshop so we know things like tyre size, weight limits, battery sizes and so on.

    I want to know if its possible to automatically fill in the vehicle details if it already exists.

    The main screen looks like this:



    primary key is the serial number field.

    currently, you enter the serial number, fill in all the rest of the details and click save/next record and an error pops up if it already exists, saying:




    is it an easy task to add it in, where the rest of the fields are automatically filled out if the serial number already exists?

    or is it just to much hassle to add it in and requires redoing the main sheet which has taken me since november to get to this stage.


    we are talking about a database which holds information of around 100 vehicles both past and present, if it helps with the decision of whether its worth it.

  2. #2
    Senior Member
    Join Date
    May 2009
    Location
    Norfolk
    Posts
    474
    Thanks
    3
    Thanked
    26 times in 26 posts
    • pipTheGeek's system
      • Motherboard:
      • Asus P6T Deluxe
      • CPU:
      • Core i7 920 @ 3.6GHz
      • Memory:
      • 3 * 2Gb Corsair XMS @ DDR3 1800
      • Storage:
      • 300GB 15K SAS + 500Gb
      • Graphics card(s):
      • GTX570
      • PSU:
      • corsair 760i
      • Case:
      • Corsair 550d
      • Operating System:
      • Windows 7
      • Monitor(s):
      • Dell Alienware 23"
      • Internet:
      • VM 50Mb

    Re: Anyone good at Access?

    I need to go put the kids to bed so this is going to be a very quick post. If I get chance later (and its needed) I'll come back in fill in the gaps.

    Hide the currently bound serial number textbox, create a new textbox, name it something sensible (not textbox1 or the same as the hidden textbox )
    Attach a macro or event procedure to its after update event. This will run when someone tabs out of the textbox.
    Now you need to find the record with the matching serial number. If you don't find a record then move to the new record and copy the serial number that you just looked for into the hidden serial number text box.
    The downside of this approach is that accidently typing into the serial number textbox while you are half way through editing a record will cause it to skip off to an existing record or a new record, which will be annoying. It's also a problem if someone goes to the new record, and starts entering one without filling in the serial number first. Then when they fill in the serial number they will get an error becuase the current record can't be saved and the macro wants to move to another new record.
    All of these can be fixed, doing things like disabling all the controls until a serial number has been entered, or make the new serial number textbox part of the form header and insist that a serial number MUST be entered before the body will even be shown.

  3. Received thanks from:

    stevie lee (02-02-2011)

  4. #3
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,230
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: Anyone good at Access?

    As pip says, you're looking for an onupdate or onblur handler that searches the database and jumps to the appropriate record if it already exists.

    I haven't done Access forms in a couple of years, but from memory you could open them in a number of modes including one for adding new records and one for retrieving existing records? If so you could have a simple form where you put in the serial number and it then opens the form either in update mode (on the appropriate record) if the serial number exists or in append mode if it doesn't?

    However you go about it though, there should be a few ways you can do what you want.

  5. Received thanks from:

    stevie lee (02-02-2011)

  6. #4
    boop, got your nose stevie lee's Avatar
    Join Date
    Sep 2007
    Location
    southport
    Posts
    2,670
    Thanks
    414
    Thanked
    422 times in 318 posts
    • stevie lee's system
      • Motherboard:
      • ASUS ROG STRIX B450-F Gaming
      • CPU:
      • Ryzen 3600 (stock cooler)
      • Memory:
      • 16 GB Corsair 3600 MHZ Cas 18
      • Storage:
      • Crucial 250GB BX500, Hitachi 640GB + 1TB. WDblue 2TB, Crucial M500 240GB
      • Graphics card(s):
      • sapphire 7700
      • PSU:
      • bluestorm II 400w
      • Case:
      • Xigmatech Midgard
      • Operating System:
      • Win 10 Home
      • Monitor(s):
      • 22" Samsung SM2233BW
      • Internet:
      • 20mb plusnet unlimited!

    Re: Anyone good at Access?

    thanks pipthegeek and scaryjim for the couple of things for me to look at.

    I'll have a fiddle with them over the next few days and see if i can get it working.

    wish me luck

    ive already corrupted the information 3 times because i dont really know what im doing, but its getting there.. slowly.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. urgent help with c++ function access
    By haelly in forum Welcome to HEXUS!
    Replies: 1
    Last Post: 17-12-2007, 05:11 PM
  2. Belkin F5D6130 802.11b Wireless Access Point
    By Howard in forum Reader Reviews
    Replies: 4
    Last Post: 10-12-2004, 11:20 PM

Posting Permissions

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