Results 1 to 5 of 5
  1. #1
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875

    Build a DYnamic Continuous Form

    I have a Table:

    Config
    ConfigName ConfigValue ConfigType
    DefaultQPPrune 180 Integer
    DefaultQPSize 8 Integer
    ShowQP True Boolean

    Where the ConfigType Field can be any of the following values:
    • 1 - Boolean
    • 2 - Date
    • 3 - Double (decimal, double, single, and currency)
    • 4 - Integer (integer and long)
    • 5 - String


    I'm trying to make a Continuous Form that, depending on the value of the ConfigType Field, dynamically choose to display ConfigValue in a Check Box/Combo Box (for ConfigType 1) or a Text Box (for ConfigTypes 2-5) with the Date Picker (ConfigType 2 only).



    Is this possible?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    I suppose could use code to set ControlSource property and visibility of each control. But be aware the setting will apply to all instances of the controls for all displayed records. I suspect the checkbox will have an issue if the data is not -1/0 (True/False, Yes/No).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Yeah, that's the problem I'm running into right now. I can easily change the Control on the Form, but it changes it for every Record and not just the current one.

    I was thinking there might be a way to use the AbsolutePosition Property of the Form's Recordset (or maybe a Clone of it) to it for individual Records, but I haven't been able to get it to work yet.

    Is there a way to look at instanced Control objects (for example: to check the value of Control X for Record 3, but not for Records 1 or 2)?

  4. #4
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Hrm, I just realized I could probably set something up where each Record is loaded in it's own Sub-Form. Then, since each Sub-Form is separate from all the others, I might be able to properly set the Controls on there...

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Is there a way to look at instanced Control objects (for example: to check the value of Control X for Record 3, but not for Records 1 or 2)?
    It is possible to get the value of specific record by querying the form's Recordset but to what end? There is still only one set of controls in use for all records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Dynamic Form, Dynamic labels/ captions?
    By JFo in forum Programming
    Replies: 15
    Last Post: 10-12-2011, 08:33 PM
  2. Non-continuous form
    By alyon in forum Access
    Replies: 6
    Last Post: 07-19-2011, 12:25 PM
  3. Need to build a preloaded form......
    By smorelandii in forum Forms
    Replies: 4
    Last Post: 01-28-2011, 03:29 PM
  4. Continuous Form
    By duckie10 in forum Access
    Replies: 13
    Last Post: 06-09-2009, 11:15 AM
  5. Replies: 0
    Last Post: 01-18-2009, 09:18 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