Making data in a field on a form appear if content is Not Null. (1 Viewer)

LOUISBUHAGIAR54

Registered User.
Local time
Yesterday, 19:59
Joined
Mar 14, 2010
Messages
157
I have a subform with continuous records. One of the fields in the recordset of the subform is a field named "Remarks". This field does not need to be visible on the continuous subform as it is rare that this field will have any entries.

I plan to apply conditional formatting on another field (IDcardNo) in the record line of the continuous subform so that when field "Remarks" contains any data it will show as a different format on the field IDcardNo.

I would like to make a small form appear when one points to the IDcardNo field with the different format, so that the data in the field "Remarks" pops up when one points to the field IDcardNo with altered format, showing that there is data in the field "Remarks".

My question is; is this possible, is it reasonable and if so can I please have some directions on how best to do it.


Many thanks.


Louis Buhagiar
 

CJ_London

Super Moderator
Staff member
Local time
Today, 03:59
Joined
Feb 19, 2013
Messages
16,618
Have you considered using the Controltip property?

Depending on your requirements you can use the mousemove event for IDCardNo to populate the controltip property for that control with an appropriate message.

The problem with a separate form is that once opened, the user will need to close the form which may detract them from their purpose - although you could perhaps use a timer on the form open event to close the form after a few seconds.
 

Minty

AWF VIP
Local time
Today, 03:59
Joined
Jul 26, 2013
Messages
10,371
Create a simple single view small form (We'll call it frmRemarks) with your Remarks field and IDCardNo Field .
On the on click event on your continuous sub form control IDCardNo do something like;


Code:
Dim sWhere as string

sWhere = "IDCardno =" & Me.IDCardNo

DoCmd.OpenForm "frmRemarks", ,sWhere,  acFormReadOnly, acDialog


This assumes IDCardNo is a Integer not a string.

Edit - CJ's Suggestion is a lot more elegant depending on the length of the remarks involved.
 

LOUISBUHAGIAR54

Registered User.
Local time
Yesterday, 19:59
Joined
Mar 14, 2010
Messages
157
I have studied the ControlTipText property in access, and it appears to satisfy my needs very well. I did not know of this useful function. Many thanks for your expertise.

PS The ControlTipText property in access however is a bit fickle. On the mousemove event you have to tease the field repeatedly to get the message to appear. Maybe anyone has some more suggestions in this regard ?

Louis Buhagiar.
 
Last edited:

Users who are viewing this thread

Top Bottom