Results 1 to 7 of 7
  1. #1
    vizit73 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2022
    Posts
    3

    Rectangle coordinates of the active cell in datasheet form.

    Hi.

    Does anyone know how to get

    Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
    End Type

    active cell in datasheet form?


    Active cell in datasheet form doesn't hwnd.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    RECT's are only valid for windows - datasheets don't have windows

    best I can suggest is vba code to do the following

    left:sum of columnwidths to left of column
    right: left+width of column in question
    top: more complicated - (determine position of record in dataset-position of top visible record in window) * rowheight - there is code around that can do that, you'll have to search for it unless another responder happens to know. Take a look at this site http://www.lebans.com/
    bottom:top +rowheight

    Probably easier to create a continuous form that looks like a datasheet - then you can get the RECT of the active control - probably still need to know the record position in the window to adjust the top/bottom values

    Why do you need to know? there is often more than one way to achieve the objective

  3. #3
    vizit73 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2022
    Posts
    3
    The program Accessibility Insights For Windows shows these element properties.
    Click image for larger version. 

Name:	RECT.jpg 
Views:	14 
Size:	249.2 KB 
ID:	48177

    Why do you need to know?
    When I activate a cell, I want to display a form with a floating button at the end of the cell.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    That's for windows forms, not access forms - what is wrong with using a combobox?

    Your question is about access forms isn't it?

  5. #5
    vizit73 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2022
    Posts
    3
    Quote Originally Posted by Ajax View Post
    That's for windows forms, not access forms - what is wrong with using a combobox?
    Accessibility Insights For Windows shows the parameters of any windows, including access forms.
    Combobox has a limit on the number of list entries.

    Quote Originally Posted by Ajax View Post
    Your question is about access forms isn't it?
    Yes. Access datasheet forms.

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    so to be clear what you are showing in post #3 is an access form?

    why would you want more than 65000 records in a combo?

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    I'm not certain exactly what you want
    In case it helps, have a look at the examples in my article: Accurately Move Forms & Controls (isladogs.co.uk)

    You will need to use a continuous form instead of a datasheet. You can make it look like a datasheet however.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 1
    Last Post: 06-29-2021, 11:24 AM
  2. Retrieve Datasheet Cell Color
    By Dragon1966 in forum Programming
    Replies: 4
    Last Post: 09-30-2014, 07:59 PM
  3. how to format Datasheet view cell
    By selvakumar.arc in forum Forms
    Replies: 4
    Last Post: 07-02-2013, 02:05 PM
  4. Replies: 3
    Last Post: 02-07-2012, 06:21 PM
  5. Replies: 5
    Last Post: 02-06-2012, 03:58 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