FORMS DESIGN IN MS ACCESS (1 Viewer)

DOMINIC KENBUNGO

New member
Local time
Today, 19:23
Joined
Jan 4, 2021
Messages
10
Dear all,

How can I design a form to include 'on screen help' of the 'sample' data expected in a field. Something like this:

ms access form.png
 

Jon

Access World Site Owner
Staff member
Local time
Today, 17:23
Joined
Sep 28, 1999
Messages
7,382
Welcome to the forums! We are the most active Microsoft Access community on the internet by far, with posts going back over 20 years!

Here are just a couple of tips for you:

1. Feel free to ask any question you like, however basic you may feel it is, or even if it has been answered before. Our expert members thrive on helping you out!

2. If you prefer a dark theme to the forums, just go to the bottom left of this forum and click "Default style". You will then see a selection of themes to choose from. I like Shades of Blue. :)

3. If you like any of the answers you get, feel free to click the "Like" link on the bottom right hand corner of the post. If you hover over the Like link, you can even choose the type of smiley.

Above all, hang around here, have fun, learn stuff and join in.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:23
Joined
May 7, 2009
Messages
19,231
is this close to what you want?
 

Attachments

  • queing banner.accdb
    464 KB · Views: 286

isladogs

MVP / VIP
Local time
Today, 17:23
Joined
Jan 14, 2017
Messages
18,209
@arnelgp has demonstrated one approach involving hidden textboxes which I'll leave him to explain.

Another approach is to use the format property of the fields in the table. See attached
The following quote explains the idea and is taken from my website article: Add Query Colour - Mendip Data Systems.
It is based on comments by fellow AWF member @CJ_London
The last of those (null) is very useful to provide a prompt to the user in a textbox- e.g. "Enter Last Name"
For text strings, there are just 2 sections, not null and null so you use: @;"Enter Last Name"
To get a grey prompt for this example you can set the control forecolor to grey, then the format property could be
[Black]@;"Enter Last Name" to show entered text in black
 

Attachments

  • HelpTextExample.zip
    22.4 KB · Views: 215

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 17:23
Joined
Jul 9, 2003
Messages
16,271
AWF member, MarkK, (I think) demonstrated a very interesting method recently, 2 years ago!

I did a blog and video about it which you can find on my website here:-

 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:23
Joined
Oct 29, 2018
Messages
21,449
Hi. I have moved your thread out of the Introduction forum.
 

Mike Krailo

Well-known member
Local time
Today, 12:23
Joined
Mar 28, 2020
Messages
1,036
The method that uses the format property doesn't seem to work in a combo box whereas the method that arnelgp uses does.
 

isladogs

MVP / VIP
Local time
Today, 17:23
Joined
Jan 14, 2017
Messages
18,209
The method that uses the format property doesn't seem to work in a combo box whereas the method that arnelgp uses does.
Hmm. Just tested using a combobox with the format method. It works fine for me

1615143022506.png
 
Last edited:

Mike Krailo

Well-known member
Local time
Today, 12:23
Joined
Mar 28, 2020
Messages
1,036
I just got bit by the Ooops message again!!!! It did not like that string of code. Using screen shot instead.

In the example database I'm using to test with, I have this:

1615144229183.png


in the format property of the combo box and it just shows up blank when its a null value. I just checked again and it's blank. Text boxes work fine though.

Colin, do you have a sample database that shows it working with combo boxes? I would like to see it.
 

isladogs

MVP / VIP
Local time
Today, 17:23
Joined
Jan 14, 2017
Messages
18,209
I just changed one of the textboxes to a combo in my example app from post #5.
Just added a screenshot to my last reply
Can you try and do what I did. If that doesn't work for you, let me know and I'll upload a modified example later
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 09:23
Joined
Oct 29, 2018
Messages
21,449
I just got bit by the Ooops message again!!!! It did not like that string of code. Using screen shot instead.

In the example database I'm using to test with, I have this:

View attachment 89768

in the format property of the combo box and it just shows up blank when its a null value. I just checked again and it's blank. Text boxes work fine though.

Colin, do you have a sample database that shows it working with combo boxes? I would like to see it.
Just checking, does your Combobox display the first column?
 

Mike Krailo

Well-known member
Local time
Today, 12:23
Joined
Mar 28, 2020
Messages
1,036
No, first column is not displayed which is why this method doesn't work with combo boxes that do not show the first column. It will work if you show the first column but how many times to we do that?

The other thing I don't like about this particular method is that the items in the drop down box are all grey and you cannot apply separate formatting like centering just the format string and leaving the data left justified after it is typed in. Arnel's method takes care of all of that.

Here is an example of what you can do with the dummy text box method that cannot be done with the format string method:
1615148848116.png
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 17:23
Joined
Jan 14, 2017
Messages
18,209
In the end, as with everything in Access, use whichever method you prefer.

There is no need to set the forecolor to grey if using the format method.
But as you say, that approach won't work if the combo has a hidden first column
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:23
Joined
Feb 19, 2002
Messages
43,213
You can also use tool tips but they are somewhat limited in size.
I've created a table based solution that works on the click event of a label. The key hear is to standardize the captions so you can use the click event of the label and its Caption property in a dLookup() to retrieve the text that is displayed in a pop up form.
 

Users who are viewing this thread

Top Bottom