Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-13-2019, 10:33 AM   #1
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 485
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Enter date after use of tab

Can I please have a suggestion on how to have
=To-Days date= placed into the =Target_Date= field after the =Target_$= has been manually entered and the tab moves to the =Target_Date= field

Thank you,
Nicole
Attached Files
File Type: mdb Date_After_Price.mdb (484.0 KB, 5 views)

access2010 is offline   Reply With Quote
Old 09-13-2019, 10:37 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,482
Thanks: 58
Thanked 1,418 Times in 1,399 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Enter date after use of tab

Hi Nicole. For example, in the AfterUpdate event of the Targe_$ control, you could try something like:
Code:
Me.TargetDate=Date()
Hope it helps...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
access2010 (09-17-2019)
Old 09-13-2019, 10:42 AM   #3
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Enter date after use of tab

also possible on Target_$, BeforeUpdate() event.

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
access2010 (09-17-2019)
Old 09-13-2019, 01:45 PM   #4
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 485
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Enter date after use of tab

Thank you for your suggestions, which I have tried without success.

Your code is entered as
Me.TargetDate=Date()

and then it is automatically changed to
Me.TargetDate = Date
Note space before and after =

Could you please let me know, what I have done wrong?

Thank you,
Nicole
access2010 is offline   Reply With Quote
Old 09-13-2019, 02:09 PM   #5
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,482
Thanks: 58
Thanked 1,418 Times in 1,399 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Enter date after use of tab

Quote:
Originally Posted by access2010 View Post
Thank you for your suggestions, which I have tried without success.

Your code is entered as
Me.TargetDate=Date()

and then it is automatically changed to
Me.TargetDate = Date
Note space before and after =

Could you please let me know, what I have done wrong?

Thank you,
Nicole
Hi Nicole. How exactly did you enter the code and what exactly happened? Did you go to the AfterUpdate event of the control and then selected [Event Procedure] from the dropdown and then clicked the ellipsis next to it and then entered the code inside the code stub?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
access2010 (09-17-2019)
Old 09-13-2019, 04:51 PM   #6
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,303
Thanks: 15
Thanked 1,597 Times in 1,517 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: Enter date after use of tab

Are you saying that TargetDate didn't get populated or you are confused because Access changed your code.

Access' "correction" is correct.

Me.TargetDate = Date ---- is correct.
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
The Following User Says Thank You to Pat Hartman For This Useful Post:
access2010 (09-17-2019)
Old 09-13-2019, 06:20 PM   #7
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 485
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Enter date after use of tab

Thank you, Pat.
I now now why the information in the code changed.

===
I have tried the update in the price field and date fields, using theDBguy's code and arnelgp code

In the = price field = after update
and in the = date field = before update

In both cases I receive this message
= Compile Error - Method or date member not found.

===
Crystal

access2010 is offline   Reply With Quote
Old 09-14-2019, 01:07 AM   #8
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Enter date after use of tab

on vba, Compile your code and you will see the error. fix it first.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
access2010 (09-17-2019)
Old 09-17-2019, 09:18 AM   #9
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 485
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Enter date after use of tab

theDBguy
Pat Hartman
arnelgp

Thank you for your assistance of using the code = Me.TargetDate=Date()
BUT, I just realized the I should have used = Me.Target_Date=Date() = which was the fields name.

Nicole
access2010 is offline   Reply With Quote
Old 09-17-2019, 09:19 AM   #10
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,482
Thanks: 58
Thanked 1,418 Times in 1,399 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Enter date after use of tab

Quote:
Originally Posted by access2010 View Post
theDBguy
Pat Hartman
arnelgp

Thank you for your assistance of using the code = Me.TargetDate=Date()
BUT, I just realized the I should have used = Me.Target_Date=Date() = which was the fields name.

Nicole
Hi Nicole. Congratulations! Glad to hear you got it to work. Good luck with your project.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 09-17-2019, 09:35 AM   #11
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,303
Thanks: 15
Thanked 1,597 Times in 1,517 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: Enter date after use of tab

When you use "Me.", you should be getting intellisense to help you finish without typing. This gives you a clue that you are making a typo. Also, if you use CamelCase and type camelcase, when you finish the word, Access capitalizes the letters to match the name's definition which is another visual clue that you have created a typo.
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form autopopulates Date field--- want to add check box to enter alternate DATE luweee Forms 3 11-04-2013 01:55 AM
How do you enter in date? mrgordon27 General 4 05-02-2013 12:15 AM
Cannot enter date in date field friendsofwolves Forms 5 12-03-2009 05:23 AM
Enter a date, add days from drop down, autofill another date box TT13 Forms 6 01-19-2008 08:37 AM
Enter Date: MStef Access FAQs 0 11-22-2005 02:11 AM




All times are GMT -8. The time now is 02:53 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World