Weekday Function

Oct 29, 2007

hello to everyone...i am a new member here.... and also a begginer in vba ....
in a few words i need to know how can i display all the monday's off a particullar month and generally another days of a month

thanx in advance

View Replies


ADVERTISEMENT

Weekday Calculation

Aug 16, 2007

I am currently building a database incorporating critical events for a manufacturing process. The start date of the process triggers the expected dates for each critical event therefore I will simply add days to the start date to get the critical event date. How do I skip weekends. If the start date was on Wednesday the 5th and the first critical event was to conclude on the 3rd day after Wednesday the 5th I would like to have the critical event skip the weekend and move to Monday the 10th. I would like to do this within a query.

View 1 Replies View Related

Weekday Calculation Problem?!?

Oct 13, 2005

Hi,

I have been trying to calculate date difference not including weekends. I found this code to use in another thread, but am unsure of where to put it.
I am quite new to using access, so a detailed description would be very useful!!!

Here's the code posted:

intDaysInPeriod = DateDiff("d", StartDate, EndDate)
intSaturdays = DateDiff("ww", StartDate, EndDate, vbSaturday)
intSundays = DateDiff("ww", StartDate, EndDate, vbSunday)

intWeekDays=intDaysInPeriod - intSaturdays - intSundays


Thanks in advance!!

Rosx

View 2 Replies View Related

Data Validation - Certain Weekday

Oct 30, 2007

I have a table embedded in a form that data is entered on. The data to be entered is a project number, date, and a numerical value. I want the date to be entered only be on a Sunday. Is there a data validation rule to apply or do I need to use VBA? I do not know VBA!

View 3 Replies View Related

Need To Convert Weekday To Text

Oct 22, 2005

I used the format text box in my query design to generate weekdays as text from my date field. It works great. However, I was hoping to produce some graphs where I could use those weekdays as 7 categories to plot against some other data. Now I am finding that to be a problem as the "real" format is a date and when I try to change the format in excel it creates this random number. Any suggestions on how to get around this problem. Thanks a bunch.

View 6 Replies View Related

Queries :: Name Of Weekday In A Query

Aug 20, 2013

solve the following without using VBA or WeekName function.

Table 1: readers name, readers birthdate
Table 2: index, day (1-Sunday, 2-Monday etc.)
Query 1: readers name, readers birthdate, weekday of birthday (by WEEKDAY([birthdate])

Now what I need is somehow to link this query with Table 2 to give me the name of the day of birth for every reader.Actually I want to use table 2 as VLOOKUP table in Excel)

View 6 Replies View Related

Transpose Weekday Columns To Rows

Dec 18, 2007

I have a table with 8 columns titled - Destination, Mon, Tues, Wed …to.. Sun. This is shown as "OriginalTable" worksheet in the attached example workbook. I want to create a new table from this original table that looks like "NewlTable" worksheet in the attached example. So I will have a new table that has 3 columns titled - Destination, Day, Weight. Weekdays will become rows so each destination will have 7 rows, one for each day of the week. The measure will be listed against each day of the week. Can someone please look at the attached example for me and help me with this.

Many thanks in advance.

View 2 Replies View Related

Date Conversion To Weekday And Weekends

Mar 12, 2008

Hi all.

I can complete this in excel no problem with monday through sunday being 1 -7, but is the same possible in access.

i.e. 12/03/08 = Wednesday.

Many Thanks Dean:confused:

Update:

DoW: Weekday([Calldate],0)

View 2 Replies View Related

Text Box Capitalizes First Weekday Character

Dec 9, 2005

Hi,

A text box on my form automatically capitalizes the fist letter of a "weekday-word".

Like when I put in "sunday" this text box converts it automatically to "Sunday".

How can I avoid this?

View 3 Replies View Related

Order By Weekday In Table And Form

Dec 27, 2013

I have a column in my table for day of the week (Monday, Tuesday, etc.). What can I enter in the "Order By" table-property to order the records by their chronological weekdays? Additionally, is there a similar type of action I can perform within a related form?

View 3 Replies View Related

Pull Month/Year/WeekDay From Calendar?

Mar 20, 2006

I've looked and looked and am afraid that I didn't find this because it's not possible...

The forms in my db are not the clearest, but one way of simplifying it for the users is to have them click on the calendar icon and then have a few fields automatically populate with the selected date's month, another with the year, and another with the day of the week.

Is this possible? I figured out how to have a field populated with the date, but with all of the specific queries needed, I have to do it this way...

Any thoughts? Also, is it at all possible (this is totally separate) to have an icon on the desktop that brings up a login sheet for which the entry users only see the front end, but the db admins log in and see the back end?

Thanks in advance!!
E

View 5 Replies View Related

=Weekday([Date]) Show Actual Day Not Number

Apr 5, 2006

I am currently using the =Weekday([Date]) formula to show which day of the week is it, but is it possible to show the actual day not a number?

Eg instead of "1" it shows "Sunday"

Cheers

View 1 Replies View Related

Display The Dates Day Or The Weekday Eg Moday In A Text Box

Mar 16, 2005

hi,

i want to dispaly the weekday or the day of the month

i am using the formula =format([date],"d") for day or "ddd" for weekday in the text box
but it is not returning the value that i want. returns #name//
whats wrong with the formula

many thanks

View 8 Replies View Related

Forms :: Count Weekday In Given Date Range

Mar 21, 2014

I am looking for Access VBA code to count number of Day Name in given range

E.g. March 01, 2014 to March 31, 2014
Mon = 5
Tue = 4
Wed = 4
Thu = 4
Fri = 4
Sat = 5
Sun = 5

View 11 Replies View Related

Reports :: Can Display Weekday In A Label On A Report

Jun 27, 2015

Can I display the weekday in a label on a report? If so, how? The record source for the report has a variable "StartDate" and I want to show the day of the week (Monday, Tuesday, etc) of this date in a label.

View 3 Replies View Related

Forms :: Calculated Controls Based On Weekday In Form

Sep 18, 2013

Here is the basic info:

Table has Checkbox column
BusinessDate column (mm/dd/yyyy format)
OrderTotal column (in dollars)
There are others but these are the relevant ones

In the header of the form I have a calculated control box with the following control:

=Sum(Abs(nz([Checkbox],0))*nz([OrderTotal],0)),0)

Which works just fine. The user is presented with a list of all the orders from this table in the form. They check the checkboxes and the control in the header shows the total of the records checked. I need to make 7 of these calculated controls, one for each day of the week. Is this possible? This way the user can see the order totals for each day of the week they have selected.

I tried:
=IIf(Weekday([BusinessDate])=2,Sum(Abs(nz([Pull],0))*nz([OrderTotal],0)),0)

but it still sums up the whole week as the expression holds true.I do not know VB, and I'm sure there is a really neat and easy way to do it in there. I just don't know how.

View 4 Replies View Related

Queries :: Display Date / Time Based On Weekday

Jul 7, 2015

I have a query which is displaying a date/time field a record was input. in my query I'd like to only display the records where the date/time based on what today is i.e. Monday it will display <Friday or yesterday for Tue to Fri.

View 7 Replies View Related

Queries :: Convert Weeknumber And Weekday To Proper Date Format

May 4, 2015

I have a query, that contains the field, weeknumber and weekday value, and year.

now i want to convert this values to proper/standard date format.

Example:
Weeknumber: 19
Weekday: 3 (Tuesday)
Year: 2015

Expected Result: May 5, 2015

View 5 Replies View Related

Modules & VBA :: Creating A Function That Counts Records And Use That Function In A Query

Dec 11, 2013

So basically I need making a function that will count the number of records from another table/query based on a field from the current query.

View 2 Replies View Related

Forms :: SUM Function Produces Error From Calculated Function

Jan 30, 2014

I have a project at hand and it's been a predecessor of mine and client has asked me to do some work on it and extend functionality - but I have not really delved into Access before and I have had to worked my way through to this final snag :/

The Main Form has one sub form. This sub form allows the user to add multiple order items i.e. qty, stock, description from records within the system - fairly straight forward.At the last column of each row is the sub total of those particular items i.e.

Qty Unit | Item ID | Total
-----------------------
2 | 1234 | 80.00
------------------------
1 | 43526 | 20.00
------------------------
> | |

So the total is a function of =[Qty Unit] * [Unit Price].Then in the Footer of this SubForm is the Sub Total

=SUM([Qty Unit] * [Unit Price])

All fine and well..... However, the additional functionality kicks in.

Lets add the additional customer_id from the Main Form. Each Item bought is dependent on the customer_id i.e. they get special prices depending on who they are.So a New table is made which has the Item ID and SpecialPriceID (of a table to define as a specialPrice) and the Price linked to this Item and Special Price category. So say that there are two groups of users "wholesale" and "nonwholesale" these would be SP_1 and SP_2 and each client is defined either one of these, and each stock item has a Price for each SP_1 and SP_2. Hopefully I've explained myself there.

Back to the SubForm. So now the Total needs to calculated differently with needed the external customer_id from the Main Form.

Code:

Function CalculateSpecialPrice(ItemID As String, CustomerID As String, Unit As Integer)
Dim SPSelect As String
SPSelect = "SELECT Price FROM [Items_SpecialPrices] WHERE"
SPSelect = SPSelect & " ItemID = '" & ItemID
SPSelect = SPSelect & "' AND SpecialPriceID = (SELECT SpecialPriceID FROM Customers WHERE customer_id = " & CustomerID & ") "

[code]....

its the sub total I just keep on getting #Error on. I have even watched (using alerts) that the correct return variable is the same as the individual rows. This is the equation I used for the SubTotal within the footer.

=SUM(CalculateSpecialPrice([Item ID], [Form]![FormName]![CustomerID], [Qty Unit]))
#Error

View 2 Replies View Related

Date Function/need Time Function

Jun 9, 2005

We have a date function that converts a text date format. Can someone help me with time function to do the same thing? We want military time. The field is like this now: txt fields.
160037
213137
224356
235716
235800
12341
21708
22732
Here is the date function we use:
Function f2Date(strDateOld As String)
Dim strDate As String, strMonth As String, strYear As String
strMonth = Mid(strDateOld, 5, 2)
strDate = Right(strDateOld, 2)
strYear = Left(strDateOld, 4)
f2Date = strMonth & "-" & strDate & "-" & strYear
f2Date = CDate(f2Date)
f2Date = Format(f2Date, "mmmm d yyyy")
End Function

View 9 Replies View Related

Now Function To Convert To Date Function

May 25, 2006

Hi all,

I need a little help. In my DB, I have a command button set up (I was tired of typing in dates) for date, but I used the Now function, which also gives me the time.

Now I have over 3000 subrecords of the main ones. I now need to queries transaction for that specific date, but it also retrieves the time.

I tried to go back and change the NOW to DATE in VB, but the code does not run.

How do I change all records that have date and time (using NOW function) and only click that command button to show only the date (mm/dd/yyyy)?

Thanks in advance.

View 1 Replies View Related

Function

Aug 1, 2005

Is there any function that can convert either a True, False, "Yes", "No" or Null value.... to a yes/no (check box) data type?

What I want to do is create a make table query. I would like to add a checkbox field from the query. So if there was a function that could convert a data type to a Yes/No checkbox, this would be very helpful...

To give you and idea of what I'm talking about...and how I want to use this... If I am making a table from a query and I want to add a number field, but leave it empty for the time being, what I can do is make a new field in the query maybe call it "Number1". What I would do is Add this as a field in my make table query:

Number1: Cint("")


This will add a blank field that is formatted as a number field when I run the make table query.

So using the same logic, I'd like to make a blank (or unchecked) Yes/No check box field when I run my make table query.

Anyway...that's what I'm hoping for.... I hope someone can help!

Gary

View 10 Replies View Related

Function Isn't Available

Nov 3, 2005

I'm having a problem getting a form to open. I'm using access 97 on on XP machine and whan I open my database I get Function isn't available in expressions in query expression '[Case Types]![theName]&"-"&Format([SourceDocs]![CaseNumber]&"","00")&"-"&Format([SourceDocs]![CaseYear]&"","00")'.

This database works fine on a Windows 2000 machine running Access 97 but none of the XP machines will open it.

Any suggestions?

Thanks,
Rick

View 8 Replies View Related

CHR() Function Not Available

Nov 10, 2006

I have a database in which I am designing a report which includes a name/address block. I am surprised to find that the report does not recognise the Chr() function in the text box control source string "=[Organisation] & Chr(13) & Chr(10) & [Address]..."; designed to insert a CRLF between the contents of the named fields.

I know the syntax is correct because I've checked by using the expression builder to replicate the code. (Expression builder includes the Chr() function, as expected.)

The interesting thing is that the function is recognised in other databases used on the same machine, both those created remotely and locally.

Anyone know what could be going wrong?

Stuart

View 7 Replies View Related

Function Is Not Available

Sep 4, 2005

I am using a crosstab query to gather info from a table. I am using the Format [DateAppt], "mmm". The query ran successfully before but I now get the error "Function is not abailable in expression in query expression 'Format ([DateAppt], "mmm")'. This is used for column headings in a report that gives results by month.

I am using Microsft Office 2000 Premium with XP Professional operating system.

I used the original disk to repair Office thinking that the function was missing from the function library but to no avail.

Does anyone know how to restore this function?

Thank you,
Jack

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved