Results 1 to 3 of 3
  1. #1
    tgavin is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Location
    New York
    Posts
    22

    Auto Filling

    This is probably a stupid question BUT

    I am trying to auto fill address fields if they choose a vendor who is in the db, a contact in the db or just a random person they type in the info for. I set it up so that the names and addresses of the vendors and contacts will fill in the text boxes for the random. While I have done it plenty of times before with a 1 to 1 (Billing City = Shipping City) this time I have to combine some fields and it isn't happy with me.

    When the code reads:
    ContactName = txtShipTo
    I get 'ContactName is an expression and can not be edited'


    When it reads:
    txtContactFName& " " & txtContactLName = txtShipTo
    I get 'invalid use of property with the txtShipTo highlighted.

    Any help would be appreciated.



    Thanks
    Terri

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    well there is more than 1 way to skin this cat; if you are selecting the vendor using a combobox - - - and you want that data to 'transfer' into fields in your form; then in the AfterUpdate event of that combobox put vb code that does it.

    a sample syntax would be:

    me.zipcodefield = me.combobox.column(3)

    assumming of course that the zipcode appears in the combobox and that it is located in column 3. keep in mind that it does need to be in the combobox in the first place although you don't necessarily have to make it visible in end by narrowing the column widths.

    just one way....using a subform is another approach.

    I hope this helps.

  3. #3
    tgavin is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Location
    New York
    Posts
    22
    Solved. Thanks.

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

Similar Threads

  1. Filling a table from a checklist
    By mr.wizzard in forum Access
    Replies: 3
    Last Post: 06-19-2010, 09:40 AM
  2. Filling in blank textbox on a report.
    By cowboy in forum Reports
    Replies: 3
    Last Post: 04-16-2010, 02:50 PM
  3. Automatically filling out a form
    By thorpef1 in forum Access
    Replies: 11
    Last Post: 01-04-2010, 07:20 AM
  4. Filling in a table via a form
    By janjan_376 in forum Forms
    Replies: 1
    Last Post: 07-06-2009, 01:57 AM
  5. Auto filling form fields
    By adamch29 in forum Forms
    Replies: 1
    Last Post: 07-25-2007, 06:22 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