Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    59

    Arrow Unanswered: Entering default value in a form from a table

    hello
    i have created a setup form and a table in which i would like to store default values like distance in KM or Miles. in another form i tried this code in the ON OPEN Event of the form
    me.abc.defaultvalue = dlookup ("DIstance", "TBLSETUP")

    now abc is a combo box . when i right click it and view the properties it shows me the correct default value but when the form is opened it shows NAME?. i dont understand why it does not show the value when the form is opened while the value is there when u right click that combo box and check the default value.. plz help


    thanks

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    As a combo box, it might be because you have no rowsource for the combobox itself. I believe you need to set a rowsource.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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