Hello,
I'm new to Access and I have a form called Memo. In this memo I've a date field. I want that form to be linked to my switchboard, which I know how to do, and when the switchboad opens, the form memo will open if the date specify in the date field in the memo is equal to today.
How do I do that?
Thanks for any help!
7 1333
I'm no "switchboard fan", as there's a lot of flexibility in there you don't need at all. Personally I prefer to create my own main form ("frmMain") holding the buttons arranged in the way the users expect them.
On such a form I would "solve" your "Show the todays memo" by just adding a subform that's using a query filtering my table "tblMemo" for today's memo('s).
Thus always the actual memo is visible and even multiple when multiple have been entered. The user won't get extracted by a "jump" to another form and the pressing of the "Close" button to proceed with his/her actual task(s).
Getting the idea ?
The "Switchboard" solution would need to add VBA code to the OnOpen event of the Switchboard form and to check for a memo row for today.
Nic;o)
NeoPa 32,556
Expert Mod 16PB
When opening the form [Memo] in the code from the Switchboard, simply specify a WhereCondition selecting only those records that match today's date : - strWhere = "[DateField]=Date()"
-
Call DoCmd.OpenForm(FormName:="Memo", WhereCondition:=strWhere)
NB. As Date() is recognised within SQL it need not be passed as a literal string.
Welcome to Bytes!
I'll echo all of Nic;o) and NeoPa's comments and add that if your form is actually named Memo you should change that name to something else, such as frmMemo, as Memo is a Reserved word in Access, and will probably trip you up, sooner or later.
Welcome to Bytes!
Linq ;0)>
"Memo" is not a reserved word in Access.
However giving names in Hungarian notation is considered to be a good programming style and, IMHO, aesthetically pleasing. :)
Name which starts from "frm" prefix makes evidence for you and for others looking at your code, that it refers to form object.
NeoPa 32,556
Expert Mod 16PB @FishVal
That seemed like a strange statement, so I looked for myself. Sure enough, it was listed as reserved (under "SQL Reserved Words" in Access 2003 help) :S
@NeoPa
Ok. My bad.
However I can't imagine situation when form name and SQL datatype could conflict.
NeoPa 32,556
Expert Mod 16PB @FishVal
To be fair though, I don't believe anyone was saying there might be. Simply (as you expressed well in your post) that it's a good idea to avoid using reserved words generally.
It's also a good idea for people to avoid embedded spaces in names as well as other punctuation characters. We tell them every time we get an opportunity to do so. Eventually some get it ;)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: James Radke |
last post by:
Hello,
I have a multithreaded windows NT service application (vb.net 2003) that I
am working on (my first one), which reads a message queue and creates
multiple threads to perform the processing...
|
by: Brian Henry |
last post by:
Ok I've never implemented a snap location before so I dont really know what
im doing wrong here... anyways, I am making a custom slider control that
takes dates as its values instead of integers......
|
by: D |
last post by:
Hello all...I have an issue with one of my java script functions that
I'm hoping someone can easily help with. I have a web based application
that we use to create/sign up for overtime. When we...
|
by: mcmahonb |
last post by:
Hey people...
I've been searching this forum for a few hours and even though this topic has been went over from many different angles; I cannot seem to figure out how to make things work on my...
|
by: pic078 via AccessMonster.com |
last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files)
that remains stuck in task manager after exiting the application - you can't
reopen database after exiting as a result...
|
by: saladinator |
last post by:
I have created an Excel spreadsheet that has a lot of data. What I
want to do is import the spreedsheet to Access and create a form so
that I can print each row per page in a proffessional manner....
|
by: sorobor |
last post by:
dear sir ..
i am using cakephp freamwork ..By the way i m begener in php and javascript ..
My probs r bellow
I made a javascript calender ..there is a close button ..when i press close button...
|
by: gubbachchi |
last post by:
Hi all,
In my application I need to display the data fetched from mysql database after the user selects date from javascript calender. I have written the code in which after the user selects the...
|
by: nigelesquire |
last post by:
I am in need of your assistance. I have a page with multiple unixtime
stamps and I need to display them in readable time and date with the
user's time zone.
Below is the code.
<!DOCTYPE...
|
by: jrod11 |
last post by:
hi,
I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |