Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2008

Tip: Looking for answers? Try searching our database.

How to add my own functions to access 2007: to select in "build"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Beepa - 26 Apr 2008 22:34 GMT
Here is the deal. I would like to create my own vb function to use in the
experession builder in Access 2007. Is that possible? One I want to create is
to determine a week number. I know I can do this in the table but I am
working in a quiery.

Or maybe you can tell me how to enter criteria so that I can pull up records
for the previous week. I want to enter a salesID which will pull up sales in
the current week in one column and the previous week in another column. The
weeks are numerical values. week 1,2 etc. I have a field set up in my talbe
that has the week number but I'm having some sort of brain fart when in my
query I try to set the criteria for the week number as the current week
number -1. I tired referencing the table field and the query field by name
then -1 ie: [weeknum] -1 but this didn't succeed.
Once again thank you for your assistance,
S.Clark - 01 May 2008 13:45 GMT
To create a VBA Function, Press Alt-F11 to open the VBA development
environment.  Create a new module, and add your function.

Other than that, you're not completely clear in your needs, but feel free to
provide more information.  Especially table structure info.

Signature

Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting

> Here is the deal. I would like to create my own vb function to use in the
> experession builder in Access 2007. Is that possible? One I want to create is
[quoted text clipped - 10 lines]
> then -1 ie: [weeknum] -1 but this didn't succeed.
> Once again thank you for your assistance,
Beepa - 01 May 2008 19:25 GMT
Ty for you help. I was trying to create a function in a query that wasn't
listed. I didn't see a date function that produced a week number.

> To create a VBA Function, Press Alt-F11 to open the VBA development
> environment.  Create a new module, and add your function.
[quoted text clipped - 16 lines]
> > then -1 ie: [weeknum] -1 but this didn't succeed.
> > Once again thank you for your assistance,
S.Clark - 01 May 2008 19:44 GMT
SELECT OrderDate, Format([OrderDate],"ww") AS TheWeek
FROM [Purchase Orders];

Signature

Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting

> Ty for you help. I was trying to create a function in a query that wasn't
> listed. I didn't see a date function that produced a week number.
[quoted text clipped - 19 lines]
> > > then -1 ie: [weeknum] -1 but this didn't succeed.
> > > Once again thank you for your assistance,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.