FORMS DESIGN IN MS ACCESS

DOMINIC KENBUNGO

New member
Local time
Today, 13:32
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
 
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.
 
is this close to what you want?
 

Attachments

@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

Hi. I have moved your thread out of the Introduction forum.
 
The method that uses the format property doesn't seem to work in a combo box whereas the method that arnelgp uses does.
 
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:
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.
 
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:
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?
 
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:
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
 
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

Back
Top Bottom