473,405 Members | 2,373 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,405 software developers and data experts.

Trying to add 1 month to a date in a text box

I am writing a memberships database. I want to be able to add 1 month to the membership expiry date using a control button. the date field is called Memexpires. and I have tried using

DateAdd("m",1,[MemExpires])

in the on click event of my command button. I get "Compile error: expected: =" in the vb window?

I have looked in several places on the web and I think that they are telling me to do the above but I am obviously missing something.

I am self taught and have never posted on a site like this before so any help would be greatly appreciated.

Thanks
Sep 15 '10 #1
3 1442
NeoPa
32,556 Expert Mod 16PB
I'm afraid it was as simple as the error message implied. You wanted the "=" at the front as in :
Expand|Select|Wrap|Line Numbers
  1. =DateAdd("m",1,[MemExpires])
So near already, just missed by a smidgen :)

Welcome to bytes!
Sep 15 '10 #2
Thanks for replying and thanks for your help. Can't believe I didn't try to put the = sign in :(
Sep 15 '10 #3
NeoPa
32,556 Expert Mod 16PB
No worries. Glad I was able to help :)
Sep 15 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jim | last post by:
I have been using the javascript below on a web page since last August to show the "Site updated" month minus a month, which has been very successful, but January is showing a "undefined 2004"...
4
by: Treetop | last post by:
I have a script for my church that we use for the weekly events. I currently have it as week of Feb 1, 2003 at the top, then list Sun - Sat below the date. I have been asked to put the date next...
1
by: Colm O'Brien | last post by:
I have a field called year end month where records hold the month financial year end for accounts is stored. i need to query the data base and return all records where year end month is less...
0
by: Colm O'Brien | last post by:
I have two tables and need help with a query Table 1 is a lookup table fields monthno 1-12 and month name January- December Table 2 lots of fields but 2 important to this query yearendmonth which...
2
by: Faz | last post by:
I am trying to extract text before a certain character appears in a string. This character is the letter "C". Here is some sample data - the field is called REFERENCE_2: REFERENCE_2...
2
by: smcgrath via AccessMonster.com | last post by:
I have a table listing accounts with a closed date - our Trial balance drops the account after 7 days but our database keeps the record forever - How do I calculate the end of month less 7 days so...
1
by: ganeshpillai | last post by:
I want to write a progeam that displays date in the following format (dd/mm/yyyy) 09/06/2007 or 9/6/2007 .
4
by: mattgray89 | last post by:
I am new to Access and trying to wrap my head around VBA. I need to first add 17 months to the field "1stQualLastSat" and to have the output date be at the end of that month. Is this possible? A...
9
ddtpmyra
by: ddtpmyra | last post by:
Im using PHP report and I convert the month date into numbers but when I generate and publish it now displaying like this... 1 10 11 2 3 4 5 6 and so forth. How can I make it happen to sor...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.