473,804 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding number to date in access form

107 New Member
Hello,
txtbox one has a date.
txtbox two has a number. number is number of days)
txtbox three is empty.
I have alot more going on but this is my question:
can I add txtbox1 + txtbox2 and show answer in txtbox3?
example:
txtbox1 - 1/2/2008
txtbox - 2
txtbox3 -1/4/2008
thank you
Jul 24 '08 #1
7 2034
SonOf27
11 New Member
Yes you can do that.
Jul 24 '08 #2
buddyr
107 New Member
not sure how to do it
do i go into properties of txtbox in control source or do I go into vb code.
Thank you
Jul 24 '08 #3
SonOf27
11 New Member
not sure how to do it
do i go into properties of txtbox in control source or do I go into vb code.
Thank you
I guess it depends on what your doing. You could trigger some vb code similar to the following from the after update of the two text boxes to populate the txtbox3 with the answer.

Expand|Select|Wrap|Line Numbers
  1.  me.txtbox3 = me.txtbox1 + me.txtbox2 
Jul 24 '08 #4
Delerna
1,134 Recognized Expert Top Contributor
Using your naming convention
Expand|Select|Wrap|Line Numbers
  1. txtBox3 = DateAdd("m", txtBox , CDate(txtBox1))
  2.  
a better way

Expand|Select|Wrap|Line Numbers
  1. txtResult = DateAdd("m", txtMonths , CDate(txtDte))
  2.  
Jul 24 '08 #5
buddyr
107 New Member
yes that worked- thank you
Jul 24 '08 #6
missinglinq
3,532 Recognized Expert Specialist
I've been doing this since the '90s! They keep telling me Date + 3 won't work in the future, but it still does!

Linq ;0)>
Jul 24 '08 #7
Delerna
1,134 Recognized Expert Top Contributor
I've been doing this since the '90s! They keep telling me Date + 3 won't work in the future, but it still does!

Linq ;0)>
Yes, and about that time they recommended not using DoCMD for the same reason. But its still there.I don't know about the latest version though.
Jul 24 '08 #8

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

Similar topics

1
2594
by: Anand | last post by:
Hi i am having trouble adding a recordset into the access database, the code seems to be working fine it passs and parses through all variables just fine without showing any errors and also when i access the recordset it displays the results, what the real issue is that the entry is not made into the database even though i use the Update command and i have also tried the BeginTrans and CommitTrans nothign seems to work and i am unable to...
2
2084
by: dixie | last post by:
I have a report which is printed daily. It is a list of people. A person can be put on this list for one day, which is easyily achieved from a simple form. My problem is that a person can also be put on the list for a number of days. The information that I would then have is the person,s ID, name, the first date they are on the list and the number of days they are on the list. Assuming that the dates are consecutive (although weekends...
5
3756
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for Office 2000. I am creating a database to track student athletes. I have created the following tables. The table title is to the far left, with fields under each. The common field will be the StudentID field, which is their student number assigned...
6
2509
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new products). Tables: tblCategoryDetails CategoryID SpecID
6
3079
by: 6thirty | last post by:
Hi, I've created a stocktaking database using Access XP. This is indexed by two fields - part number and shelf location. I am currently inputting all the data via a form. When I have entered a record such as: part number 202354-001 location C1-01
3
2833
by: tai.cabrera | last post by:
What I would like to do is input a range of serial numbers in a form and have that range populate in the table without me having to put them in one at a time manually. The numbers do not exist yet, either. I'm not sure how else to explain it. The tables I use have the following Fields: Table 1 (PK) Serial Number Date Sold Sold By
1
2956
by: Nigel Heald | last post by:
Hi Folks, We have a form that records flight times in hours and minutes, for example a 1 hour 15 minute flight is recorded as 1:15 Does anyone know how to get Access 2003 to calculate a total figure for a number of flight times recorded in a datasheet form? and is there a way to display flight times greater than 24 hours i.e 26:20 for example? The only solution i can find is to use decimal times i.e 1.25 instead of 1:15 which is our...
2
2566
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received - 20/6/07 Certificate - yes What I want to create is a renewal date for this training, there are
1
2023
damonreid
by: damonreid | last post by:
Access 2003 Microsoft Windows XP Pro Hey, I am currently pulling my hair out here. I have a Form for adding new projects to a database, the only problem is that when I close the form it doesn't insert that information into the table. This is a major problem as it is suppose to use the information to populate several other tables with key information and open another form based on some of that information (in this case project number). ...
5
1848
by: shayko | last post by:
Hi Guys, It's been a while since my last access project... I know that maybe my question will be basic for most of you, but I will be greatful to get some help dealing with it: I need to prepare an access form that will manage work hours. I have three tables that each has the following: Table 1: Employee number, Name, Surname Table 2: Brunch number, Brunch name Table 3: All of the above + Date, Hours (in amount) - my form needs all of...
0
9714
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10351
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10096
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.