Results 1 to 2 of 2
  1. #1
    Davide is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    38

    update form field

    I have two tables:



    client(id, name, markup)
    forecast(id, client.id, client.markup, total)

    I have created a form on the second table, forecast.
    The client can be selected by means of a combox from the first table, client.
    Now I would like the corresponding markup to appear in the client.markup field.
    I have tried with an expression:
    Code:
    =DLookUp([client]![markup];[client];[client]![ID]=[client])
    but it does not work and a get an error: #type!
    Any suggestions? thanks

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,535
    On the forecast form you would have a combo box to select the client. It would have a column for the ID, a column for the Name, and a third column for the markup. In the After Update event of the combo box use code to assign the value of the third column to the markup on your form. Something like:
    Me.[NameOfMarkupControl] = Me.[NameOfCoboBox].Column(2)

    Column(2) is actually the third coulm because the numbering starts with 0.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Field Update By Form
    By bandara in forum Access
    Replies: 1
    Last Post: 04-18-2020, 11:51 AM
  2. Replies: 4
    Last Post: 03-27-2018, 09:19 PM
  3. Replies: 6
    Last Post: 04-26-2013, 10:07 AM
  4. Replies: 3
    Last Post: 09-20-2012, 11:23 AM
  5. Replies: 2
    Last Post: 07-16-2011, 07:56 PM

Tags for this Thread

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