Results 1 to 4 of 4
  1. #1
    skillsboy is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    2

    ActiveX igrid control - inherit data type / control type


    I'm trying to create a form with the 3rd party igrid control on ms access 2016 32bit, i've been able to add the control to the form and populate the grid with data from a table recordset << iGrid1.FillFromRS recordsetName >>. After populating the grid they come all as data type textbox, i guess.. But what i would like is to inherit from the table the data types and if they control is a combo box inherit that from the table.

    I don't know if this is possible, but any help is appreciated.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    why not just use a datasheet?

  3. #3
    skillsboy is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    2
    Quote Originally Posted by Ajax View Post
    why not just use a datasheet?
    Because i need some features datasheet does not have, like multiple selection and copy one field to many fields.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    OK - you can parse through the recordset fields to find the datatype then format the cell as required. According to the suppliers you can change properties, but doesn't say whether one of those properties is a datatype, you will need to contact the suppliers or research their specification/help pages

    air code would be something like

    Code:
    dim fld
    for each fld in myRecordset.fields
        select case fld.type
            case dbBoolean
                 'do something here
            case dbChar
                 'do something here
            case....
        end select
    next fld
    where myRecordset is the name of the recordset you assigned to the grid

    for field types - depends on your type of recordset
    dao - see this link https://docs.microsoft.com/en-us/off...e-property-dao
    ado - https://docs.microsoft.com/en-us/sql...ql-server-2017

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

Similar Threads

  1. Replies: 11
    Last Post: 11-09-2014, 05:18 PM
  2. Attachment data type and Control question using VBA
    By johnnyBQue in forum Programming
    Replies: 4
    Last Post: 11-06-2014, 02:20 PM
  3. Replies: 2
    Last Post: 10-29-2014, 10:48 AM
  4. activex control (ado data control)
    By metokushika in forum Access
    Replies: 4
    Last Post: 11-07-2011, 12:45 AM
  5. #Type! error in form control
    By Ashe in forum Forms
    Replies: 2
    Last Post: 09-29-2011, 12:44 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