Results 1 to 6 of 6

Thread: Specifying default values in add query

  1. #1
    Join Date
    Oct 2002
    Posts
    161

    Specifying default values in add query

    I know how to default fields in add mode to a constant value, but how do I specify the default value to be the content of one of the query fields, in other words when I want to add a new record I want to default the customer ID field to the current customer ID and I dont want to use the copy button because there are to many fields to blank out just keep the customer ID field.

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    Looks like no easy way to do this one but again let's wait for some input.

    Internally, it is pretty easy to implement like ->

    if _Def="Moi!" then _Def=Raw_Record_Value

    Another way to do that is to run the _Def value through the MagicCell porcessor which is more involved.


    Frank

  3. #3
    Join Date
    Oct 2002
    Posts
    161
    I worked around the problem by re-retrieving the record in a common table and making the field a drop down which only has one value.

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    I know there is a solution somewhere. Yours is not bad at all. If it is not good enough, let me know and I'll implement that (takes me about 3 lines of code!).


    FK

  5. #5
    Join Date
    Oct 2002
    Posts
    93
    Hi,

    You can also retrieve it as you are today, but instead of making it a dropdown, just make it a readonly field and set the default value [xxx] to that retrieved value.

    John

  6. #6
    Join Date
    Oct 2002
    Posts
    32
    i agree

Posting Permissions

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