What did i do wrong Results

Here is my code for the function:
Option Compare Database

Public Function DLQBucket(deldays As Integer) As String

If deldays = 0 Then
DLQBucket = 0
Exit Function
End If

'delq, now find a bucket
Select Case deldays
Case 1 To 29
DLQBucket = 1
Case 30 To 59
DLQBucket = 2
Case 60 To 89
DLQBucket = 3
Case 90 To 119
DLQBucket = 4
Case Else
DLQBucket = 5
End Select

and here is my entry for a query field:
April Bucket: DLQBucket([April]![deldays])

I get an error that reads: Undefined Function 'DLQBucket'
what did I do wrong?

I'm a newbie here, but I've spent a good deal of time reading the threads, and there are some very knowledgeable users here, so I pray that someone can figure out what's going on and can help me. I adopted a database that tracks machine productivity (among other things). Information is fed into Start Date, Start Time, End Date and End Time fields in a master table. The Format of the Start and End Date fields is changed to ShortDate via the Format function in a Query. When I attempt to use [Between] or any other method of achieving the same thing to obtain search criteria the query returns the incorrect data, however if I use a wildcard (for example, for any date in August I would use 8/*/2004 as a criteria in the Start Date field) everything works out fine. What can I do to be able to use [Between] to generate my date criteria? Personally, I wouldn't mind using the wildcard method, but other users of this database would prefer to input their own dates using the mm/dd/yyyy method. Furthermore, what could be causing this?

Any help is greatly appreciated, if anyone needs any more info, I'd be happy to oblige. Thanks!

Ok, I am very annoyed with the parameter value box which requires me to enter a value and it was unintentional and wasn't suppose to happen.

On the main menu, I am trying to generate the report based on the date range, report type, and document type, here's my VB code:

If IsDate([txtFirstDate]) And IsDate([txtEndDate]) Then
recDateCrit = "[txtDateRecieved] >= # " & [txtFirstDate] & "# AND [txtDateRecieved]


This should be so simple but why won't it work?

I've criteria in a query to select records between a period.

it's like this:

Between Form!frmName!frmField And Form!frmName!frmField

Why won't it work?


Why the criteria on my second table does not appears when i run two joined tables in Access?

I joined two tables and when I run it, only the criteria on my first table appears, but not from the second one. what did i do wrong?

I have attached the file to my thread. The query named is "joined". can someone please help me! I am new with Access! thanx!

I did add the specific field from that second table to my query, but only the fields appears from my second table with no data.

Hi , I have created a database in MSAccess version 2002 which contains a lot of forms to allow administration of data. These forms rely heavily on combos to look up records for editing. It all worked beautifully if i do say so myself! I have recently upgraded to version 2003 and found that none of my combo boxes/forms work!!. On starting up my access database i get multiple message boxes asking for the values from these combos, where it did not do this before.- the format of the message being MAIN_FORM!SUBFORM!COMBO1.VALUE

i also tested this separately by creating a test form with combo from which the value is used in a query which populates the sub form (the format for most of the forms on my database) and found that this does not work!!
can anyone tell me why? this is so frustrating!!




I tried to use CDate for the change of time format from US: MM/DD/YYYY to DD/MM/YYYY in one form, where I state start date and end date in order to get all the records between these two days. I don't know, what I did wrong but it's still not working properly and I get records also out of the predefined interval So I suppose the CDate conversion doesn't work for me

	If Me.Starting_date_of_occurrence.Value > "" And Me.Finishing_date_of_occurrence.Value > "" Then
    If Not (WhereString = "WHERE ") Then
        WhereString = WhereString & " AND "
    End If
    start_date = CDate(Me.Starting_date_of_occurrence.Value)
    end_date = CDate(Me.Finishing_date_of_occurrence.Value)
    WhereString = WhereString & "(((MORs.[Date of occurrence])>=#" & start_date & "#) AND ((MORs.[Date of occurrence])

well the problem is this:
i created a mask to do a certain kind of document (using a submask too)
i created a report
i put a key to print the report (just the one with the right id and date)
what i get are several copies of the report (the number of copies is the same of the number of items in the submask)
But i need to have JUST ONE document printed
What should i do?
Where did i do wrong?

I have a table with two columns; [Number] and [Amount]. On the report, I have 3 fields; [Number], [Amount1] & [Amount2].

[Amount1] is =IIf([Number] Like "[A-G]",[Amount],"")
[Amount2] is =IIf([Number] Like "[H-Z]",[Amount],"")

The details are coming up correctly but I am having an error message “Enter Parameter Value” for the total for Amount1 and Amount2.

[Total Amount1] is =Sum([Amount1])
[Total Amount2] is =Sum([Amount2])

The totals are in the Report Footer.

What did I do wrong? Thanks for any advise.

Just switched to Access 2007 and I'm having trouble with a group aggregate.

Situation: We manage a bunch of servers owned by different projects. Over 500 servers, maybe 40-50 projects, 4 to 20 servers on a given project.

We get requests to apply server patches & updates & installations. We have to track the requests by specific request name across all servers but we often have to report grouped by project as well as give details of a specific server. Many of my reports will be dynamically filtered based on some factors so we can report on single projects or single requests. The filtration is working but the group footer counts are not always cooperative.

So I've got a report that shows these groupings:

Report header: Titles and such, no real data.
Outer group header: Action name
Inner group header: Project name
Details: Server name and the current state of that action on that server
Inner group footer: Count of servers for the project
Outer group footer:
Report footer:

The base query is NOT a summation query because that same query will support maybe six to ten different reports that can be filtered by various criteria and can provide various amounts of details. It's a humongous JOIN based on a junction table with LOTS of translations implicit in the joining. I let the report impose the grouping based on report design, but it is always based on the same recordset.

What I want in the outer group footer is the count of distinct projects for which at least one server was involved. If the particular action didn't apply to ANY servers on that project, it wouldn't be shown on that segment of the report anyway. I don't want non-represented projects to be counted as a project affected by the request. That's not what I get, though.

I get a number equal to the count of all servers across all groups having that particular applicable action. I want to just count the number of groups, not the number of servers. It supplied me with "=Count(*)" when I used the report design tools to tell it I wanted an aggregate in the group footer. But there is no aggregate called "COUNT DISTINCT" so I couldn't select it. I've told it to count different fields (i.e. not * but Project Short Name) to see if it makes any difference, but since I cannot select "DISTINCT" on any of these, it doesn't help. I've tried counting records and counting values, but that doesn't help. The only saving grace is that when I imported the data from its point of origin, I filter out nulls, so no field is null in any of my tables.

For the report footer, I want the count of distinct requests, but I get the count of ALL servers across all projects and all requests. So again, no joy.

I've played around with the silly thing for a while and can't quite get that outer footer or the report footer quite right. That includes the running sum options (except I want non-running counts, not running sums.)

Obviously, I've forgotten something. So... what did I do wrong? I don't recall having this problem the last time I tried to do unique value counts in group footers. Can you help me with my brain cramp?


I'm fairly new to VBA in Access. I want to run a Query using :
DoCmd.RunSQL SQL_text
However I'm experiencing problems in generating the SQL_text variable. The problem is related to the SQL code. I read some articles about it and I tried to apply that knowledge. Unfortunately, with no success. Please could you help me figure out what did I do wrong. My SQL_text variable is defined as:

SQL_text = "SELECT [Step9: Renaming Comment columns].[Target Region], [Step9: Renaming Comment columns].[Payroll Region], [Step9: Renaming Comment columns].Business_Unit, [Step9: Renaming Comment columns].[BU RPT], [Step9: Renaming Comment columns].[Sales Org BU], [Step9: Renaming Comment columns].[Sales Specialty Code], [Step9: Renaming Comment columns].[Sales Title], [Step9: Renaming Comment columns].[Employee Name (Last, First)], [Step9: Renaming Comment columns].[Employee ID], [Step9: Renaming Comment columns].[Manager Name (Last, First)], [Step9: Renaming Comment columns].[Manager Employee Number], [Step9: Renaming Comment columns].[Mail sent to Mgr (dd-mm-yy)], " & _
"[Step9: Renaming Comment columns].[Handled By], [Step9: Renaming Comment columns].[Manager Notification Sent], [Step9: Renaming Comment columns].[Manager Notification Sentdate], [Step9: Renaming Comment columns].[Days Outstanding], [Step9: Renaming Comment columns].[Generation Date2] AS [Generation Date], [Step9: Renaming Comment columns].[Letter Issue Date], [Step9: Renaming Comment columns].[Viewed Date], [Step9: Renaming Comment columns].[Letter Passively Approved (dd-mm-yy)], [Step9: Renaming Comment columns].[Accepted Date], [Step9: Renaming Comment columns].[Reject Reason], [Step9: Renaming Comment columns].[Quest CL Status]" & _
", [Step9: Renaming Comment columns].[CEE CL Status], [Step9: Renaming Comment columns].[Measurement Period], [Step9: Renaming Comment columns].[Emp Status Code], [Step9: Renaming Comment columns].[SalesLetter Employee#Active Flag] AS [Sales Letter Employee Active Flag], [Step9: Renaming Comment columns].[Block View By Manager], IIf([Generation Date] Is Null,[Why not Created],'') AS [Why not Generated], IIf([Generation Date] Is Null,[Other Comment for not Created],'') " & _
"AS [Other Comment for not Generated], IIf([Quest CL Status]='Escalated',[What action taken against Escalation],'') AS [What actions taken against Escalation], IIf([CEE CL Status]='Generated' And [Quest CL Status]'Accepted' And [Quest CL Status]'Escalated',[Why not Accepted2],'') AS [Why not Accepted]" & _
"FROM [Step9: Renaming Comment columns] LEFT JOIN [FY11 H1 CEE Comments Table] ON [Step9: Renaming Comment columns].[Employee ID] = [FY11 H1 CEE Comments Table].[Employee ID];"

The code crushes and displays a Run time error 2342 "A RunSQL action requires an argument consisting of an SQL statement

I have created user groups and their rights, but I cannot seem to create a single user login and password. What did I do wrong?


I have two questions that are related. I am using the stand switchboard.

First question:
I would like an option to close the form rather than the application.

I tried commenting out the exit out part of the code but this still closes the application. What did I do wrong, or is there something else in this module that I am not seeing?

' Exit the application.
Case conCmdExitApplication
'       CloseCurrentDatabase

Second question:
Is there a way to put a password on one of the options that lead to another group of options? I don't see an easy way to accomplish that so... I have two switchboards. A main one and one used for App Maint. The App Maint Switchboard I requires a PW when the form opens.

This works well except... see question one above. Other than putting a form close button how can I change the code to close the form rather than the app itself using the switchboard buttons.


	If Me.lstAnalyst.ItemsSelected.Count > 0 Then
    strWhere = "("
    intItem = 1
        strWhere = strWhere & "TLOG.[Analyst] = """ & Me.lstAnalyst.ItemData(intItem) & """" & Chr(10) & " OR "
        intItem = intItem + 1
    Loop Until intItem = Me.lstAnalyst.ItemsSelected.Count
        strWhere = strWhere & "TLOG.[Analyst] = """ & Me.lstAnalyst.ItemData(intItem) & """)"
        bolWhere = True

when i step, intItem just goes for ever
what did i do wrong?

I have a form...
It is for a table that has location information and a photo...
(one table)
When inputting locations and photos I will sometimes run across a location that has multiple photos...
Each location has a couple fields that are important (and might help answering my question)...

One is called:
Location_ID (primary key autonumber)
This field denotes each individual location.

The Other is called:
loc_Site (text field)
This field denotes Site reference number.

Ok, what I would like to do...
Is create a button...
If I am inputting a locations photo and I run across a location that has more than one photo...

I want to click an ADD_LOC button...
Generate a Whole Brand New Location Entry...
(new Location_ID and Empty Photo field)
BUT I want to carry all the OLD location data over and from there I would adjust the Site so that it now reads...
OldNumber.1 or .2 or .3, etc...
Then I insert a new photo...

And I am done...

I tried creating a button...
I used the wizard for new record...
I inserted code that:
Dimmed a variable called Duplicate_Field_Name for each field that I wanted to carry over...
(ie DUP_Site, DUP_Description, DUP_Address, etc...)
I then let each DUP_Field = the field...
So it looked kinda like this...

DUP_Site = loc_Site
DUP_Address = loc_Address

I then carried through with the vb code the wizard dropped in that generates a new record...

Then I did just the opposite of above...
loc_Site = DUP_Site
loc_Address = DUP_Address

What did I do wrong (If you know/care)
What can I do to accomplish the results I want...?

Thanks in advance...

mysql server instance configuration:

1. detailed configuration
2. developer machine
3. transactional database only
4. directory = c:mysql datafiles
5. decision support (dds)/olap
6. enabled tcp/ip networking port 3306, enabled firewall exception, enabled strict moe
7. standard character set
8. enabled install as windows service, service name is mysql, enabled launch automatically,
disabled Include Bin directory in windows path
9. enabled Modify security settings, new root password is password and cofirm password is password
disabled Enable root access, disabled Create an anonymous acct.
10. Execute (clicked)
11. error on Start Service.

What did I do wrong? I tried over and over but still same error that the service cannot start. What should I do. please help. I am studying mysql this time of the day.

Now what did I do wrong. I created a new forum. Tried to use the Wizard for creating a sub form then I got a message "For Loop not initialized". I’m running 2007 with a split SQL running in the BE.
Any ideas or thoughts would help.

These are from a post that I used to help me get things going. I had almost the same exact problem as the guy with the "Undefined Function Error".


Undefined Function Error
I'm stumped. Anyone have clue?

All my reports that contain Access string functions like =Left([Lastname],1) are no longer identifed by Access. They worked at one time, but I have done so much coding I don't know when they stopped working.

I tried to create a new report with the same function, but get the same "Undefined Function" error.

I also created another database with the same function to see if Access was corrupt, but it worked fine.

Any thoughts?


12-04-2001 12:43 AM

R. Hicks
Senior Member

Registered: Dec 1999
Location: Birmingham, Alabama, USA
Posts: 788
This is usually caused by a "Missing" library reference.

Open any module in design view, select Tools/References in the VBA Window if Access 2000/2002 or Tools/References in Access Main Menu if Access 97. Check the list of library references for "Missing" attached to a checked reference. If you locate one and the reference is not needed in the app, simply uncheck the offending reference and your problem should be cleared up. If the missing reference is needed in the application then you will need to install and properly register the needed files associated with the library on the offending machine.
If this problem is in Access 2000/2002 and you are using DAO references in your code, you may need to enable (place a check in box) Microsoft DAO 3.6 library. This can cause the problem you describe also.



Now, I did what was suggested, and found that the Microsoft DAO 3.6 library was the culpret on this machine. I found it, checked the box next to it, and all is well on THIS machine. Problem is... I am on a network. Now, I still get the same error message on EVERY machine I go to, EXCEPT my machine. I was wondering if I have done something incorrectly, or have I missed something. I did not find anything in the list of library references as "Missing" attached to a checked reference.

Please help me, if you can. Like I said, I am on a network (at work), and the Form / Query that this is having problems with, is one that SEVERAL people access (including our recieving department). We are basically dead in the water without having this thing work properly.

What makes me UPSET is that, the thing was working one day, then is broken. I find information from you guys to help resolve it and get it working, only, NOW it ONLY works on my machine. What is up with that ?!?!?

Thank you in advance

I'm trying to create a database of Publications (instruction manuals) where one publication is a modification to a parent modification. I'm storing all 'publications' in one table for better maintenance. This means that I have to use a Self-Join if I want to make one the parent, and one the child. Fundamentally this is no different than the Employee/Supervisor example I've found in many places:


I created a query with two copies of the same table with the 2nd one renamed for easier viewing. The query final comes up, but when I choose "ParentPub", it doesn't give me a drop down showing the other pubs so that I can choose one to be the parent.

What did I do wrong? I should be able to open up the table 'tblPubs', and get a drop down menu showing me all the pubs I can assign as a parent.

Thank you for your help,

i am exporting some table to excel file, but the problem is that not all data are being exported.
all text or numeric is transfering completely but all the ole objects are not, for example: picures, files( all the ole object i made it LINK)....so if it is a link why cant it being trasfer, what did i do wrong?

please advice,


Not finding an answer? Try a Google search.