Width of the recordselector

  • Thread starter Jerome Engel via AccessMonster.com
  • Start date
J

Jerome Engel via AccessMonster.com

hi, my im making an accessproject where i use a menu to switch between several forms. so i need to make the buttons every time on the same place. (i set the left and top poperty to the same value.)
now my problem is that some Forms need a recordselector, and some other unbound forms don't. The recordselect shift the form to the right, and so the buttons do not overlap anymore.
does someone know, what is the with of the recordselector, so i can change the "left" value.
an other solutin is also welcome

*****************************************
* This message was posted via http://www.accessmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.accessmonster.com/Uwe/Abuse.aspx?aid=afe8b33ed48f452e9a3b99a44d7001c8
*****************************************
 
B

Brett Collings [429338]

Jerome,

Which buttons need to be in the same place? The Menu ones or the
Forms ones?

I appreciate that English is not your native language, but I cannot
understand the problem yet. Can you help us any more?

Brett


hi, my im making an accessproject where i use a menu to switch between several forms. so i need to make the buttons every time on the same place. (i set the left and top poperty to the same value.)
now my problem is that some Forms need a recordselector, and some other unbound forms don't. The recordselect shift the form to the right, and so the buttons do not overlap anymore.
does someone know, what is the with of the recordselector, so i can change the "left" value.
an other solutin is also welcome

*****************************************
* This message was posted via http://www.accessmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.accessmonster.com/Uwe/Abuse.aspx?aid=afe8b33ed48f452e9a3b99a44d7001c8
*****************************************

Cheers,
Brett
 
J

Jerome Engel via AccessMonster.com

The menu is on the form itself. To be exactly i placed a rectangle on the form. In this rectangle i've placed the buttons on the menu, i've placed (pasted) them on every form.
now it are the menu buttons which shift to the right, when a recordselector is activated on the form.

Jerome

*****************************************
* A copy of the whole thread can be found at:
* http://www.accessmonster.com/uwe/Forum.aspx/access-forms/20446
*
* Report spam or abuse by clicking the following URL:
* http://www.accessmonster.com/Uwe/Abuse.aspx?aid=ad5f64f4c4954aa4bbc5deefb5d22ff0
*****************************************
 
B

Brett Collings [429338]

I'm still not entirely sure, but all it sounds like is that your form
is wider than the screen and you are therefore getting a scroll bar
along the base?

Brett

The menu is on the form itself. To be exactly i placed a rectangle on the form. In this rectangle i've placed the buttons on the menu, i've placed (pasted) them on every form.
now it are the menu buttons which shift to the right, when a recordselector is activated on the form.

Jerome

*****************************************
* A copy of the whole thread can be found at:
* http://www.accessmonster.com/uwe/Forum.aspx/access-forms/20446
*
* Report spam or abuse by clicking the following URL:
* http://www.accessmonster.com/Uwe/Abuse.aspx?aid=ad5f64f4c4954aa4bbc5deefb5d22ff0
*****************************************

Cheers,
Brett
 
S

Stephen Lebans

I know the logic/code I mention below is in one of my projects but I
simply cannot remember which one. Just a second...I'll go look.
Yup, it was in the older A97 subclassFormatByCriteria conditional
formatting code. YOu can get all of the API declares from the top of the
clsFormatByCriteria class module. The code below is from the hWndDetail
PropertyLet section.

' Is the RecordSelector property enabled?
If m_Form.RecordSelectors = True Then

' Get rectangle for our Form's Detail Section
lngRet = GetWindowRect(m_hWndDetail, rcDetail)

' The difference between the Left values of these
' 2 rects is the width of the RecordSelector and
' the window border.

' Get rectangle for our Form's Window
lngRet = GetWindowRect(m_Form.hWnd, rcForm)

' Get Client Rectangle for Form
lngRet = GetClientRect(m_Form.hWnd, rcClient)


' The difference between the Left values of these
' 2 rects is the width of the RecordSelctor(if any) and
' the window border. Our control positions are relative to the
'Debug.Print "rcDetail.Left:" & rcDetail.Left
'Debug.Print "rcForm.Left:" & rcForm.Left
Me.RecordSelectorWidth = Abs(rcDetail.Left) - Abs(rcForm.Left)


Anyway on my system, 1024*768 at 120DPI it works out to be 24 Pixels or
(24*12)=288 TWIPS.
On a few quick tests the size of the Record Selector was not influenced
by changing any of the desktop settings for ScrollBar width, etc.
Perhaps it is a constant and you can simply grab the current screen
resolution and adjust the value.



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Jerome Engel via AccessMonster.com said:
hi, my im making an accessproject where i use a menu to switch between
several forms. so i need to make the buttons every time on the same
place. (i set the left and top poperty to the same value.)
now my problem is that some Forms need a recordselector, and some
other unbound forms don't. The recordselect shift the form to the right,
and so the buttons do not overlap anymore.
 
J

Jerome Engel via AccessMonster.com

yes its this what I need, I think. But I suppose that I need the clsFormatByCriteria class module. because functions like RecordSelectorWidth do not exist. cann you tell me where i could find this class module?

Thx

Jerome

*****************************************
* A copy of the whole thread can be found at:
* http://www.accessmonster.com/uwe/Forum.aspx/access-forms/20446
*
* Report spam or abuse by clicking the following URL:
* http://www.accessmonster.com/Uwe/Abuse.aspx?aid=c9a99151f0cb403494dd7f74a1bb83df
*****************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top