Results 1 to 2 of 2
  1. #1
    jackjsmtih88 is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2011
    Posts
    6

    Best solution for my database? (autocompleting fields) PLEASE HELP ME!!!

    right, im designing a database to manage all files and documents for a company i work for, my database consists of:

    Tables
    Stock Controller (main)
    Exceptions
    ISOS


    Waste Disposal
    Driver Ctrl Forms
    Postcodes and Boroughs

    Forms:
    Stock Control
    Exceptions
    ISOS
    Waste Disposal
    Driver Ctrl Forms

    now, the problem i have, in the stock control form, it has these fields:
    ID
    Collection Number
    Date
    Postcode
    Town
    Borough
    Item
    Weight
    Qty
    Comments

    what i want to acheive is.. when i type in a postcode, say "SE18" on the stock control form/table i want it to recognise that as a postcode from my [postcodes and boroughs] table, and so, as a result, recognise that "SE18" from [postcodes and boroughs] belongs with "Woolwich" from [postcodes and boroughs] and "Greenwich" from [postcodes and boroughs] and then automatically completes the "town" and "borough" fields on my form as soon as ive completed the "Postcode" field,

    BUT!!

    the tricky part is,
    1. i want it as a typing autocomplete, not a dropdown box
    2. i want to be able to type "SE18" then it completes the rest, and then i can continue to write "7NB" to finalise the postcode..
    3. i want to be able to link this with the [exceptions] Form/Table, and [Waste Disposal] Form/table so that it autocompletes on all Tables/Forms with a "postcode" "town" and "borough" field..

    Screenshots:

    Stock Control Form:
    http://imageshack.us/f/823/formv.jpg/

    Postcodes and Boroughs Table
    http://imageshack.us/f/411/postcodes.jpg/

    and the Stock Control Table:
    http://imageshack.us/f/266/stockm.jpg/


    Any Help or suggestion is GREATLY! appreciated.. thanks

  2. #2
    DatabaseMakers is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    London
    Posts
    12
    Using space to fire the dlookups it would look something like this:

    Private Sub Postcode_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 32 And Shift = 0 Then
    Me.Town = DLookup("[Town]", "Postcode and boroughs", "Postcode='" & Me.Postcode.Text & "'")
    Me.Borough = DLookup("[Borough]", "Postcode and boroughs", "Postcode='" & Me.Postcode.Text & "'")
    End If
    End Sub

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

Similar Threads

  1. Web Based Solution Reading Access Database
    By EddieN1 in forum Access
    Replies: 1
    Last Post: 08-06-2011, 04:38 PM
  2. Help for Database Solution
    By ritorocking in forum Access
    Replies: 2
    Last Post: 05-17-2011, 09:46 AM
  3. DLookup or Other Solution
    By IFA Stamford in forum Access
    Replies: 3
    Last Post: 12-31-2010, 11:18 AM
  4. Corrupt Database: Possible solution?
    By asearle in forum Access
    Replies: 2
    Last Post: 07-14-2010, 01:59 PM
  5. Best solution
    By geeka in forum Access
    Replies: 1
    Last Post: 12-04-2006, 01:12 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
  •  
Other Forums: Microsoft Office Forums