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

I Cant Return a Next Due Date based on two items of criteria?

Hi to all those Knowledge Brokers out there!

I am trying to get a field to return a date (Next Due date) only if a
box is checked (is it planned or unplanned)and Type of Work performed
(i.e if DNV add 12 months)

so for instance i fill in the fields like so:-

Date work done, Description of work, performed by, Type of
Maint(select from dropdown, this table has Frequency field), Planned
(check box)and work completed (Checkbox)

i want the Next Due Date Field to auto fill with a date base on If the
checkbox say yes it was planned and what type of maintenance was it
then return a date by adding the date done plus a value in the
frequency field of my maintenance types table.

hope this makes sence.

Rgds
Dave Mann
Nov 13 '05 #1
1 1549
Hi Dave,

In your Type Of Maint combobox rowsource, you need to include the frequency
field. Let's call the combobox TypeOfMaint and say the frequency is in the third
column. Let's say the frequency is 30 days. Let's say the checkbox is called
Planned. Put the following code in the AfterUpdate event of the checkbox:

Dim Frequency As Integer
Frequency = Me!TypeOfMaint.Column(2)
If Me!Planned = True Then
Me!NextDueDate = DateAdd("D",Frequency, [DateWorkDone ])
Else
Me!NextDueDate = Null
End

Column(2) is used because columns are zero based making the third column 2
rather than 3.

If your frequency is measured in something other than days, lookup the DateAdd
function in the Help file for what to use in place of "D".
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Dave Mann" <bb*****@hotmail.com> wrote in message
news:67**************************@posting.google.c om...
Hi to all those Knowledge Brokers out there!

I am trying to get a field to return a date (Next Due date) only if a
box is checked (is it planned or unplanned)and Type of Work performed
(i.e if DNV add 12 months)

so for instance i fill in the fields like so:-

Date work done, Description of work, performed by, Type of
Maint(select from dropdown, this table has Frequency field), Planned
(check box)and work completed (Checkbox)

i want the Next Due Date Field to auto fill with a date base on If the
checkbox say yes it was planned and what type of maintenance was it
then return a date by adding the date done plus a value in the
frequency field of my maintenance types table.

hope this makes sence.

Rgds
Dave Mann

Nov 13 '05 #2

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

Similar topics

47
by: Martin DeMello | last post by:
It seems to be a fairly common pattern for an object-modifying method to return None - however, this is often quite inconvenient. For instance def f(lst1, lst2): g((lst1 + lst2).reverse()) #...
5
by: keith | last post by:
This may seem simple, but I'm having a bit of trouble figuring out exactly how to do it. I'm accessing a database through an ODBC link, and I have a query that returns only jobs completed that day...
9
by: Kurt | last post by:
Hi I was trying to get this VB type code to work in C Sub SetColumns_Example( Dim ol As Outlook.Applicatio Dim MyFolder As MAPIFolde Dim itms As Item Dim itm As Objec Dim dtmStart As Date,...
16
by: Mike Fellows | last post by:
when i load my windows form i populate a combobox i use the code below Dim conn As New System.Data.SqlClient.SqlConnection(strConn) Dim sql As String = "AllLenders" Dim da As New...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
7
by: mr.nimz | last post by:
hello, this is antenio. recently i've come to a problem. i got a way through it, somehow, still it left me in a curious state, so i'm posting it here, if i can get an answer from some techy, ...
7
by: tasmontique | last post by:
I have an access table that outputs to excel using a query . However what I am trying to do is under the arrival date column specify a criteria based on the Datepart function that only displays...
2
by: jennk | last post by:
i am working in Access 97, our database tables are linked from ODBCsqlsvr (not even sure what that means). i have a table where each record has a unique customer and their order information. there...
8
by: Dr Al | last post by:
I have a table with four date fields, some of which may not be filled in based on our data entry needs. I have a criteria set as <date()-180 which is supposed to pull dates older than 180 days ago....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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...
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
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...
0
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...
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,...

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.