473,785 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding current time in field with toggle button

I am trying to add the current time to a field when the user clicks on
the toggle button next to the field. I am getting a time of 12:00:00
AM each time I click the button.

How do I get a return of the current time?

MarthaR
Nov 12 '05 #1
2 10728
If by "add the current time", you mean insert the current time, then
Try:
Sub ToggleBtn_Click
me!TimeField=fo rmat(now(),"sho rt time") ' or any other time format
end sub

HTH,
John

"MarthaR" <ki***********@ hotmail.com> wrote in message
news:6b******** *************** ***@posting.goo gle.com...
I am trying to add the current time to a field when the user clicks on
the toggle button next to the field. I am getting a time of 12:00:00
AM each time I click the button.

How do I get a return of the current time?

MarthaR

Nov 12 '05 #2
ki***********@h otmail.com (MarthaR) wrote in
news:6b******** *************** ***@posting.goo gle.com:
I am trying to add the current time to a field when the user clicks on
the toggle button next to the field. I am getting a time of 12:00:00
AM each time I click the button.

How do I get a return of the current time?

MarthaR


Look at your watch. :)

Seriously, you need to post the code that's fired in the OnClick event of
your button. I suspect that you are using date(). use time() instead, or
use now() which ill return both, and format the textbox (you called it a
field, but it's a textbox) to show the hours only.

Bob Q
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4297
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field that has been modified/clicked the form doesn't always submit. When it does work, a Stored procedure is passed form variables and updates to the db are made. When it doesn't, its as if the form wasn't submitted, it reloads and resets the page, but...
32
2172
by: Ed Jay | last post by:
A complete js newbie is asking this question: I have a form comprised of several questions, each answered with a radio button. I'd like to use onClick to bring up additional text at the end of the form (not in a text box). I've tried using document.write("yada"), but it clears the page before showing the text. How can I do it? BTW, I'm currently using js in conjunction with CSS to unhide the text. This works fine, except it requires...
11
14414
by: Bobbak | last post by:
Hello All, I have these tables (lets call it ‘EmpCalls', ‘EmpOrders', and ‘Stats') that each contain the list of EmployeeIDs, I want to be able to create a Module in which I could call in my VB form (by clicking and command button)that will add a column (field) to each table and label it with the current date that is specified in my form. Does anyone know how I can go about doing this? Any suggestion will be greatly appreciated.
1
1754
by: Jackson M via AccessMonster.com | last post by:
I have buttons name A thur Z - When I select say the letter "H" button I need my ProductName field to jump to the record that starts with the letter "H" and soforth. Can anyone help -- This Message Is Coming To You From Sunny South Padre Island, Texas Message posted via http://www.accessmonster.com
3
4885
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
1
3872
by: Mike | last post by:
Hi all, Hum i just erased the whole message by mistake, :( Ok so i want to hide a specific field in an Access form using a toggle button, but i cant seem to get the right syntax. Right now im using a macro to toggle the Visible bit (SetValue), but i want to add a filter which would, when i press the button, compare the field value (string) with another string, "No Action" for example, and then decide wheter to hide the field or not. What...
1
2021
damonreid
by: damonreid | last post by:
Access 2003 Microsoft Windows XP Pro Hey, I am currently pulling my hair out here. I have a Form for adding new projects to a database, the only problem is that when I close the form it doesn't insert that information into the table. This is a major problem as it is suppose to use the information to populate several other tables with key information and open another form based on some of that information (in this case project number). ...
2
2922
beacon
by: beacon | last post by:
Hi everybody, I've searched and searched for the answers to these questions until I've turned blue in the face, so I finally decided to come here for some assistance. Here's the info I'm working with: MS Access 2003 Call log database using data access pages One table called tblCRS_Data_Log Primary key is CallNo An assortment of other fields, including check, text, and combo boxes
1
4909
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
0
9645
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10329
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9950
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.