Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 19th, 2003, 02:03 PM
Ryan_Baxter Ryan_Baxter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Indianapolis, IN
Posts: 40 Ryan_Baxter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Question Time

Is there a way to create a button that when clicked it inserts the current time into a bound field? If so is there a way that once that field is filed the same button would go to another unbound field? I'm trying to learn to write code from reading what the wizard does but there isn't a wizard for this

Last edited by Ryan_Baxter : November 20th, 2003 at 02:06 PM.

Reply With Quote
  #2  
Old November 21st, 2003, 01:40 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
It is possible. but it would invlove using a Public Counter and a case statements. I don't know if you want to go to that degree.

S-

Reply With Quote
  #3  
Old November 22nd, 2003, 09:22 AM
Ryan_Baxter Ryan_Baxter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Indianapolis, IN
Posts: 40 Ryan_Baxter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
If that is what I have to do then if you could give me an example of how to do it I would be greatful. I work for a small ambulance company and I'm working on a dispatch program to track the call info and the time stamping I described in the first post is the only thing I really can't figure out.

Reply With Quote
  #4  
Old November 23rd, 2003, 04:40 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
As I though about you need, I thought about a better way to do what you are asking, at least I think it will be better for you.

One each Text box where you need to automatically enter current time. In the Double_click event of those text boxes, enter code that will put the currtne time in the text box. This way you don't have to worry about any kind of loop or anything else. When the user wants the current time to show in the text box, the just double click on it and it shows up., If you need the other code sample let me know.

S-

Reply With Quote
  #5  
Old November 23rd, 2003, 04:47 PM
Stev Stev is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Queensland, Australia
Posts: 256 Stev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 53 sec
Reputation Power: 5
My usual method of handling this is to set the TABstop property of the DateTime control to "NO" and set the value when the form loads or some other event.

Use

DateTimeStamp.Value = Now()

to get the current date and time and put it into the control.

When you say "go to another unbound field" do you mean to set the focus to another control? If so use the SetFocus method for that control at the Click event for the button.

Private Sub Command6_Click()

ControlName.SetFocus

End Sub

Reply With Quote
  #6  
Old November 24th, 2003, 06:35 AM
Ryan_Baxter Ryan_Baxter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Indianapolis, IN
Posts: 40 Ryan_Baxter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
What I need is the button when pushed to insert the current time in short time format into an unbound or bound field then when that same button is clicked again for it to insert the time into another unbound or bound field. I hope that I have explained it so that you understand what I mean. I think that it has to be bound fiels because I need the information put into an underlying table. I think that it might require If Then statement but I have no idea how to write it.

Reply With Quote
  #7  
Old November 24th, 2003, 09:29 AM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
Can post a copy of the form you are planning to use I will give you an example.

S-

Reply With Quote
  #8  
Old November 24th, 2003, 09:32 AM
Ryan_Baxter Ryan_Baxter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Indianapolis, IN
Posts: 40 Ryan_Baxter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Yeah Give me a few I'm still in the design stage and I'll have to build a demo of the form

Reply With Quote
  #9  
Old November 24th, 2003, 10:06 AM
Ryan_Baxter Ryan_Baxter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Indianapolis, IN
Posts: 40 Ryan_Baxter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Here is an example of the form it is the one named Demo
Attached Files
File Type: zip baxtercad.zip (70.9 KB, 240 views)

Reply With Quote
  #10  
Old November 24th, 2003, 12:35 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
Here you go.

I would still only put the code in the double click action of each of the text boxes (included it also for you to look at) there are potential reasons for each, but I will let you decide what you like best)

Advice: I know you where rushed to put the demo together and Access can handle spaces in the names of textboxes and table, adn queries, but Don't use spaces. It makes it harder to code later on. It is also good to prefix the object with someting that identfies what the object is that is being used

S-

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Time


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT