473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Update Date

I have 4 fields on a form, they are simple drop downs, which can be
changed throughout the life of a record.

I have a date field that users change when they changeone of the four
drop downs, sort of a last update date.

Can I automate the date field to change to to whatever the date is
when a drop down is changed.

Thanks

Matt

Feb 20 '07 #1
5 5550
<ma*************@npower.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
>I have 4 fields on a form, they are simple drop downs, which can be
changed throughout the life of a record.

I have a date field that users change when they changeone of the four
drop downs, sort of a last update date.

Can I automate the date field to change to to whatever the date is
when a drop down is changed.

Thanks

Matt
Yes, put this code in your combo box's after update event:

Me.txtMyTextBox = Date

HTH - Keith.
www.keithwilby.com
Feb 20 '07 #2
Hi Keith, I get an error message saying MS Access cant find macro ME.
am i been thick.

I have used:-

Me.txtText543 = Date

Thanks

Matt

Feb 20 '07 #3
<ma*************@npower.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
Hi Keith, I get an error message saying MS Access cant find macro ME.
am i been thick.

I have used:-

Me.txtText543 = Date

Thanks

Matt
You need to add the code to a class module - open your form in design view.
Select your combo box, then on the properties box select the "Event" tab.
In the After update event, select "[Event Procedure]", then click just to
the right of the white box area. This should open the class module and
place the cursor where the code needs to go.

"Me" is a keyword and refers to the current class module. Your text box is
an object associated with the class module, so when you type "Me." (note the
full stop/period) you should get an "intellisense" list containing the name
of your text box. Select the name from the list and that should do the
trick.

HTH - Keith.
www.keithwilby.com
Feb 20 '07 #4
On 20 Feb, 16:04, "Keith Wilby" <h...@there.comwrote:
<matthew.news...@npower.comwrote in message

news:11**********************@l53g2000cwa.googlegr oups.com...
Hi Keith, I get an error message saying MS Access cant find macro ME.
am i been thick.
I have used:-
Me.txtText543 = Date
Thanks
Matt

You need to add the code to a class module - open your form in design view.
Select your combo box, then on the properties box select the "Event" tab.
In the After update event, select "[Event Procedure]", then click just to
the right of the white box area. This should open the class module and
place the cursor where the code needs to go.

"Me" is a keyword and refers to the current class module. Your text box is
an object associated with the class module, so when you type "Me." (note the
full stop/period) you should get an "intellisense" list containing the name
of your text box. Select the name from the list and that should do the
trick.

HTH - Keith.www.keithwilby.com

Keith, thats great thanks for your help, if you do read this do you
know of a good Access book I could buy to help me further, about this
level (little bit of VB)

Thanks again

Matt

Feb 21 '07 #5
<ma*************@npower.comwrote in message
news:11*********************@h3g2000cwc.googlegrou ps.com...
>
Keith, thats great thanks for your help, if you do read this do you
know of a good Access book I could buy to help me further, about this
level (little bit of VB)
Hi Matt, try this or just search Amazon's book section for "microsoft
access":

http://www.amazon.co.uk/Access-VBA-P...e=UTF8&s=books

Keith.
Feb 21 '07 #6

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

Similar topics

3
by: Ken Bush | last post by:
How can I write an update query that removes part of a field? Like if I have a field with values such as 8/3/68 (a birthday obviously) and I need to put values in a new column but I need...
3
by: rrh | last post by:
I am trying to update a field in one table with data from another table. The problem I'm running into is I need to base the update on a range of data in the 2nd table. Table 1 has: date field...
3
by: BlackFireNova | last post by:
This concerns an Access 2002 (XP) database. There are two fields, "Notes" (Memo Field) and "Notes Update" on a form (among others) which I am concerned with here. Problem: I need to be able...
2
by: nadmasl | last post by:
I have an MS Access form, where a user enters the date by selecting it from three combo boxes for day, month and year. I convert it to 11-Jan-2004 format and attempt to write to the table with an...
8
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: ...
1
by: Riley DeWiley | last post by:
I have an UPDATE query that is always setting 0 records. When I cut and paste the SQL into Access and use it, it fails in the same way unless I coerce the date fields to be '=now()', in which case...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
31
by: Lag | last post by:
Having a problem updating my database from a web page, through a submission form. Can anyone help? ----THIS IS MY CODE IN update.php----(user, pass, and database are typed in directly, I...
2
osward
by: osward | last post by:
Hello there, I am using phpnuke 8.0 to build my website, knowing little on php programing. I am assembling a module for my member which is basically cut and paste existing code section of...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.