I've create a series of short commands that make some modifications to some tables. I figured since they must happen sequentially that I would create a stored procedure that runs all of them. It works fine, but I worry that as the database grows and each command takes more time, that the...
Well, I did that in the beginning but I found that I also need to re-apply the location number in the rowswource SQL of the listbox. I'm wondering how I can get the listbox to use only the people from the location that is selected in the main form. ie - have the listbox use the results from the...
I have a main form from which a user can select a location from a combo-box. I've added a tab with a sub form showing address, phone etc.
I've added another tab and sub form, I want this second sub form to have 4 list boxes which list people in each job at the location selected in the main form...
Skip, that's closer than I've gotten on my own. The error I get with the datevalue function is "Datevlue is not a recognized built-in function name. Statement could not be prepared." I suppose it's because this is a SQL database so I'm trying to compare a date-time field to a date only. Added to...
I have a SQL database, I've written a report in crystal reports that works great. I want to pull the same data into excel. If I use the same sql in MS Query I get errors on the date. Here is the code as it is used in Crystal, can someone help me make it MS Query compatible?
SELECT...
What I found out is I have 3 criteria, so had to have a 3-deep nested query. EMPLID (employee id)- the '0' EMPL_RCD (employee record), the latest date, and if one date has more than one transaction, the latest transaction (EFFSEQ)
Here is the code that works -
SELECT
a.EMPLID,
a.EMPL_RCD...
Sometimes a person is terminated at one location, then hired at another. This transition will be recorded on the same day. So on Effective Date Aug 8 Jane could be terminated at location A (EFFSEQ0), then hired at location B (EFFSEQ1).
For whatever reason, if I change the first chunk to read...
I've gotten my query this far, however if 2 actions happened on a record on the same day - I get 2 results for that record.
Say a person 006 changed locations and got a raise on the same day, they will have EFFSEQ 0 and EFFSEQ 1 for that day - thus giving me 2 records for person 006 in my...
Well, I discovered that some people were missing. So back to the drawing board! These two queries work when run independent of each other, but I've messed up the join again. It says it can't find the column 'MAX_EFF_DATE'. If I take that out, it still runs but only if I increase the timeout by 3...
I'm sure the problem with this SQL goes deeper than syntax error. This worked great before I tried to add email addresses to my results.
Syntax error on line 13 and 23:
(SELECT
a.EMPLID,
a.EMPL_RCD,
a.EMPL_STATUS,
a.HR_STATUS,
a.EFFSEQ,
a.ACTION,
(CONVERT(CHAR(10),a.[EFFDT],110)) AS...
I've decided that in order to get the allocation for the state to show in the header, then I'll just have to re-create the form as main form and sub form. The original designer put a ton of formatting in the form, and I was too lazy to recreate it! Admittedly, doing so in the first place would...
This is close to what I need help with. I have State, County, Category, Allocation. The query that is already the control source of the report I am modifying (to group by state) will return results like:
State County Item Allocation
Washington, County1, Printers, $1,000.00...
Oh, duh.
Me.cmbLocName.Value = Me!LocNum
Column Width = 0",2"
cmbLocName is now equal to the locations number (to reference later) and the box shows the location by name.
Sorry.
Being curious, I changed the column width property from 0",2" to 2",2" - now I can see my value. I'm still confused because my row source is:
SELECT locations.LocNum, locations.LocName FROM locations ORDER BY [LocName];
Shouldn't the box now show LocNum, LocName (ex 1225,Alpine)?
Have I gone...
My form has a combo box 'Programs' in the header. When a program is selected the form displays all the data for that program. Works great with text boxes.
One text box displays the location of the program. Programs can move to other locations, so I would like to have the locations box be a combo...
You know what? When In pasted in the code and started writing an explanation... I realized my error. I was pulling the phone number & grant info from the ONE table rather than the MANY table. Good grief. Just goes to show, sometimes it's good to walk away for awhile!
Thanks for asking!!!!
I have 2 tables, PhoneAccounts and PhoneInventory. PhnoneInventory has Primary Key "PhoneNumber" (no Dupes). PhoneAccounts has PrimaryKey "PnoneNumber" (Dupes OK). PhoneAccounts does have some duplicate phone numbers because one phone may be paid for by 2 grants. I need a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.