UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Combo To Auto Insert Date, Access 2013    
 
   
sging1
post Dec 24 2018, 01:47 PM
Post#1



Posts: 162
Joined: 29-June 05
From: Wales UK


Hi guys and Merry Christmas

Hope some one can help as I just cant find the best way to do this. When I select Closed in in "Status" combo filed I want a bound filed to insert today date. Sounds simple but I cant get it to work, I got it working when I basically change the combo to any selection but I only want it to insert a date when Closed.

What adds to the problem is there is already and After Update Macro set up for this Status Combo.

hope someone can help.

Kind regards

Stephen
Go to the top of the page
 
Doug Steele
post Dec 24 2018, 01:54 PM
Post#2


UtterAccess VIP
Posts: 22,210
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Try something like

CODE
Private Sub cboStatus_AfterUpdate()
  
  If Me!cboStatus = "Closed" Then
    Me!txtCloseDate = Date()
  End If
  
End Sub

--------------------
Doug Steele, Microsoft Access MVP (2000-2018)
Personal webpage
Microsoft profile
Co-author: Access Solutions: Tips, Tricks, and Secrets from Microsoft Access MVPs, published by Wiley
Co-author: Effective SQL: 61 Specific Ways to Write Better SQL, published by Addison-Wesley Professional
Technical Editor: Access 2010 Bible, Access 2013 Bible, Access 2016 Bible, all published by Wiley
Technical Editor: SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition, published by Addison-Wesley Professional
Go to the top of the page
 
sging1
post Dec 24 2018, 02:23 PM
Post#3



Posts: 162
Joined: 29-June 05
From: Wales UK


Thanks Doug for the quick response.

If the After Update is taken already by a Macro Event how else can I do this.

regards
Stephen
Go to the top of the page
 
sging1
post Dec 24 2018, 02:25 PM
Post#4



Posts: 162
Joined: 29-June 05
From: Wales UK


It seems to work on the Change event is there any problem using it there.

Stephen
Go to the top of the page
 
tina t
post Dec 24 2018, 02:43 PM
Post#5



Posts: 6,125
Joined: 11-November 10
From: SoCal, USA


QUOTE
If the After Update is taken already by a Macro Event how else can I do this.

you can set control values in macros. just add it to your existing macro.

hth
tina

--------------------
"the wheel never stops turning"
Go to the top of the page
 
sging1
post Dec 26 2018, 09:37 AM
Post#6



Posts: 162
Joined: 29-June 05
From: Wales UK


Thanks Tina I didn't know you could do that.

Have a nice day.

Stephen
Go to the top of the page
 
tina t
post Dec 26 2018, 07:28 PM
Post#7



Posts: 6,125
Joined: 11-November 10
From: SoCal, USA


you're welcome, Stephen, happy New Year! :) tina

--------------------
"the wheel never stops turning"
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    23rd October 2019 - 04:08 AM