Query fonts etc

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Query fonts etc

Post by bknight »

I'm trying to remember the Access programming class I took in the 90's. so using A97 or A2k is there a way through programing/or hard coded into the query design to change font color criteria todays date versus a date in the tables? Memory losses are a constant nagging issue with me sometimes.

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

What do you mean by "to change font color criteria todays date versus a date in the tables"?
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

For example if the target date is greater than todays date make the output of the query green.

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

You cannot do that in a query.

On a form or report in Access 2000, you can apply conditional formatting to text boxes and combo boxes using Format > Conditional Formatting.
In Access 97, you'd have to use VBA code. This is relatively easy on a single form and on a report; it's much more difficult on a continuous form.
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

This is all That I have to work with.

EDIT: Adding Field parameters
You do not have the required permissions to view the files attached to this post.
Last edited by bknight on 07 Nov 2016, 17:24, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

Again, you cannot set this in a query.
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

Only in a report?

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

In Access 2000, you can use conditional formatting for text boxes and combo boxes on a form and on a report.
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

Something like this, but doesn't work.
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

@Today() is not valid in Access. Use Date() instead (without @).
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

That worked!

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

Good to hear that.
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

Is there a shortcut/key stroke combination the "refreshes" a query? The only way I have been able to accomplish this is to go to design view and then back to datasheet view.

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

When you open a select query, there is a Refresh All button on the Home tab of the ribbon. There is no specific keyboard shortcut for this button, but you can use Alt+H, K, R, E
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

All four keys with Alt selected? I get a ping when I do something like that.

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

No, hold down Alt while pressing H, then release Alt (this will have selected the Home tab of the ribbon).
Then press K and R and E one after the other.
(This is the sequence that works in Access 2016; I don't have Access 2007 to test on)
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Query fonts etc

Post by bknight »

Alt +H, results in KR icon over The refresh all in the ribbon.
After KR you get A or E choice.
Thanks

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Query fonts etc

Post by Rudi »

For others reading this post; this is the sequence in visuals... (Access 2013)

Holding down ALT, then pressing "H" results in this:
SC001.jpg
After releasing all the keys and then pressing "K" results in this:
SC002.jpg
Now pressing "R" results in this:
SC003.jpg
Lastly press "A" for Refresh All or "E" for Refresh.

:whisper: This is the end of the presentation. You may all now advance to the back of the room and grab some refreshments and a muffin.
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

BobSullivan
3StarLounger
Posts: 235
Joined: 08 Jun 2010, 20:03
Location: Morgantown, PA

Re: Query fonts etc

Post by BobSullivan »

When I want to re-run my queries, I press Shift+F9. Is that the same as a refresh?
Cordially,

Bob Sullivan
Elverson, PA

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Query fonts etc

Post by HansV »

Shift+F9 "requeries the underlying tables", i.e. it reruns the active query or refreshes the active form.
Best wishes,
Hans