Microsoft Office

Microsoft Office Questions? Ask a IT Expert for Support ASAP

Ask a Computer Expert,
Get an Answer ASAP!

Microsoft Office

Hi experts, Have a simple problem that I lack the knowledge

Customer Question
Hi experts, Have a simple problem...
Hi experts,

Have a simple problem that I lack the knowledge to complete.
I am trying to code a form to record current time in a field when a button is pressed on the form.

i.e. I have a vehicle dispatched time field, and I want the database to record the time when the button is pressed,

Any assistance very welcome,

Thanks,

Bryan. [email protected]
Submitted: 5 years ago.Category: Microsoft Office
Show More
Show Less
Ask Your Own Microsoft Office Question
Answered in 50 minutes by:
2/7/2012
Microsoft Office Technician: Richard, Software Specialist replied 5 years ago
Richard
Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 41,058
Experience: Over 15 year experience resolving Microsoft Office Issues
Verified

Professional Help :

Hi there

Professional Help :

if it is sql or access, just put in as the default value

Professional Help :

=now()

Professional Help :

that will do it

Professional Help :

if you have difficulties, please let me know

Customer:

Thanks,

Professional Help :

your welcome, if it worked please remember to click accept

Customer:

So let me explain, I have a form which captures EMS vehicle dispatch data, the field I am trying to populate with the time is Call Details.Vehicle1 dispatch time, I am trying to get the time into that field on click from a button on the form, however, =now() doesnt work as it is formatted for time, not long date.

Customer:

Also am unsure of the query builder syntax to tell it to populate the other field with the time, once clicked

Professional Help :

what is it? MS SQL, ACCESS? .NET?

Professional Help :

once i know I can give you the correct syntax

Customer:

Access 2010

Professional Help :

ok, go to the field in form design

Professional Help :

right click and choose properties

Customer:

There

Professional Help :

ok look for default value

Professional Help :

in it type

Professional Help :

=now()

Professional Help :

and click out of it and test

Customer:

Ok, thanks, XXXXX XXXXX but remember, I need them to click a button to set the time, got pretty serious legal requirement as it is the recorded time for ambulance dispatch, there will be a lag between them starting capturing call data, and dispatching the ambulance, hence the requirement to trigger an event based on button click

Professional Help :

ok, then on the button event do this

Professional Help :

pretend the name of the field that holds the date it DATEFIELD

Professional Help :

then

Professional Help :

the onclick event of the button has this

Professional Help :

me.DATEFIELD.value = now()

Professional Help :

then when they click the button it would put it in the field

Customer:

Awesome, checking, thanks

Customer:

Do i need the table name or just the field name?

Professional Help :

just firld

Professional Help :

sorry not field

Professional Help :

control

Professional Help :

the name of the text box on your form that will hold the value

Customer:

Ok, sorry for being dumb, been years since I did this. Text box control is Vehicle 1 dispatch time, get an error when I enter me.Vehicle 1 dispatch time.value = now()

Professional Help :

no spaces

Customer:

Ah! do I need to rename the field in the table to kill out the spaces first?

Professional Help :

no, just name the control without spaces

Customer:

Ok, error now is it cant find macro called ME

Professional Help :

?

Professional Help :

did you do

Professional Help :

me.control.value = now()

Professional Help :

in the onclick event of the button?

Customer:

Yep,

Professional Help :

can you copy and paste it all here, including the sub name

Customer:

Exact text in the onclick event is: "me.Vehicle1dispatchtime.value = now()

Professional Help :

when you type me.

Professional Help :

do you see a list of controls?

Customer:

Starting over, 1 sec

Professional Help :

no problem

Customer:

Ok, when I do it in the expression builder I see it breakdown the command correctly, but now has different error.

Professional Help :

are you doing this in the onclick event of the button?

Professional Help :

let me make an example for you and send it

Customer:

Ok, thanks. I've done it both in the onclick box and also in the event builder, same result, I know Im being stupid, just cant remember how to!

Professional Help :

download this

Professional Help :

http://wikisend.com/download/128602/Database8.accdb

Professional Help :

look at form1

Professional Help :

and youll see how I have done it

Professional Help :

let me know if it still doesnt work for you please

Customer:

Thanks will check now

Customer:

I will do, Thanks for your help

Customer:

Got compile error: Method or data member not found.

Customer:

Am gonna take the spaces out of the field name and see if that works

Professional Help :

ok... but should matter

Professional Help :

just the control name is important

Customer:

OK, still no luck, matches your's exactly, with control name set right, Compile error: Method or data member not found

Professional Help :

can you upload the DB?

Professional Help :

go to www.wikisend.com

Professional Help :

give me the download link and I will do it for you

Professional Help :

how did you go with this Bryan?

Customer:

Uploaded database to link here: http://wikisend.com/download/408932/Emer-G-Med Project.accdb Table being populated is Call Details, Form in question is also Call details. You will see an unmarked button on top of the Time1 field (renamed to rule out a syntax error) if you could be so kind as to show me how you would populate the Time1 field on click I'd be very grateful

Professional Help :

ok, found the problem, you had the wrong name

Professional Help :

put this in the buttons onclick and replace the other code you did

Professional Help :

Me.Vehicle_1_dispatch_time.Value = Now()

Professional Help :

that works

Professional Help :

let me know how it goes please

Customer:

Brilliant, thanks a lot!!

Richard
Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 41,058
Experience: Over 15 year experience resolving Microsoft Office Issues
Verified
Richard and 87 other Microsoft Office Specialists are ready to help you
Ask your own question now
Ask Richard Your Own Question
Richard
Richard
Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 41,058
41,058 Satisfied Customers
Experience: Over 15 year experience resolving Microsoft Office Issues

Richard is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

jstinehelfer

jstinehelfer

Information Systems Manager

36 satisfied customers

A+ Comptia Certified computer repair

JasonJames122

JasonJames122

Computer Enthusiast

0 satisfied customers

I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business

Jess M.

Jess M.

Computer Support Specialist

701 satisfied customers

Computer Software Specialist for more than 10 years

The-PC-Guy

The-PC-Guy

Computer Manager

588 satisfied customers

20 years experience providing remote computer support

James K.

James K.

Consultant

260 satisfied customers

Technical Director of IT Company

IT Miro

IT Miro

Computer Scientist

157 satisfied customers

Bachelor's Degree in Information Technology, Microsoft Certified Professional

Chris L.

Chris L.

Support Specialist

147 satisfied customers

Certified Expert with over 10 years experience.

< Previous | Next >

Related Microsoft Office Questions
I have just had to reload /restore my Windows software as my
Hi, I have just had to reload /restore my Windows software as my system no longer logged onto the internet. One day to the next, it just would not show me Wifi connection details. I fixed that with th… read more
technicalcat
technicalcat
Computer Science
838 satisfied customers
It seems that a worksheet I was working on is no longer
It seems that a worksheet I was working on is no longer there. The workbook went white with small blocks at random places on the screen. I know I did not delete it. How can I recover it? It shows in t… read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
I have lost all my sheets below, on my Excel file - why? I
I have lost all my sheets below, on my Excel file - why? I have Excel 2007 … read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
I just recently I cannot send and receive the emails. When I
Hi I just recently I cannot send and receive the emails. When I click the button(send and receive)of tool bar, The message of "operation failure" comes up. Also, most buttons of tool bar doesn't work.… read more
Cody
Cody
Computer Science
1,716 satisfied customers
Running Outlook 2016 on Windows 7 machine. I disabled junk
Running Outlook 2016 on Windows 7 machine. I disabled junk in the program and the registry and it is still placing critical emails in the junk folder. How do I disable?… read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
My MS 2016 stopped working. Win 10. No I haven't used it in
My MS 2016 stopped working JA: What application are you using? Customer: win 10 JA: Have you installed any updates recently? Customer: no I haven't used it in a while JA: Anything else you want the Mi… read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
Cannot get the security updates to go on Windows 10. No. is
Cannot get the security updates to go on Windows 10. No. is Oxc1900208 … read more
Cody
Cody
Computer Science
1,716 satisfied customers
If I want Office 365, can I buy it or do I have to Lease it?
If I want Office 365, can I buy it or do I have to Lease it ? … read more
RussellA
RussellA
Solutions Architect
Bachelor\u0027s Degree
123 satisfied customers
I bought it, but did not install. It would not install 365.
I bought it, but did not install JA: What application are you using? Customer: it would not install 365 JA: Have you installed any updates recently? Customer: no JA: Anything else you want the Microso… read more
Jason Jones
Jason Jones
AAS Information Technology
6,320 satisfied customers
Just updated the Office 16 automatically and neither of my
Just updated the Office 16 automatically and neither of my printers will print Word files. Will print when using old Office 11 program. What can I do? … read more
RussellA
RussellA
Solutions Architect
Bachelor\u0027s Degree
123 satisfied customers
Microsoft Outlook error messages: 0x8004210A. & 0x800Ccc92 I
Microsoft Outlook error messages: 0x8004210A. & 0x800Ccc92 I changed my Gmail password, causing these errors apparently. Today is my last day of membership.… read more
Kris R
Kris R
IT Manager
Computing
2,652 satisfied customers
Windows 10 is trying to update but stalls first at 75% and
windows 10 is trying to update but stalls first at 75% and then at 82%. It completely hangs up the system and we need to reboot three times to allow for a previous windows package to resume operation.… read more
D.Sandlin
D.Sandlin
Support Technician
6,708 satisfied customers
I've been working on a excel spreadsheet. I have 0ffice 365.
I've been working on a excel spreadsheet . I have 0ffice 365 . I've been working on the spread sheet for three days . I have this on a laptop . I was on my iPad deleting some excel spreadsheets . My c… read more
Kris R
Kris R
IT Manager
Computing
2,652 satisfied customers
I am on a computer away from my home computer in the desk of
Hi. I am on a computer away from my home computer in the desk of which is my microsoft license number. Can you help me? What information do you need? … read more
technicalcat
technicalcat
Computer Science
838 satisfied customers
When I export an edited file from Word to gmail all of the
When I export an edited file from Word to gmail all of the text edits show up on the sent message. I have tired setting review and the trust center controls but can not get the default to be - do no d… read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
M. -Burnett and I have had Microsoft as as I have had my
Hi, my name is***** and I have had Microsoft as long as I have had my computer. The problem is that my internet service, cell service, etc. was with Verizon and when they came in to set everything up,… read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
Something went wrong problem. Followed instructions to
Something went wrong problem. Followed instructions to uninstall Microsoft office. That was completed. Then lost contact at the point where instructions were given on how to reinstall office. Can you … read more
Jason Jones
Jason Jones
AAS Information Technology
6,320 satisfied customers
I renewed my subscription and it was confirmed on November
I renewed my subscription and it was confirmed on November 13, 2017 that I had; received an email from Nov 13th from Microsoft Office 365 specifying confirmation. Then on Nov 29 I received an email st… read more
Kris R
Kris R
IT Manager
Computing
2,652 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x