Start-up Query After Log-in
Apr 23, 2008
In my db I have a password log-in for each user. During the log-in process, I have a query set to run:
Code:SELECT tblSetOut.LogNum, tblSetOut.WoNum, tblSetCont.SetContName, tblSetOut.OrdAssign, tblSetOut.WoStat, tblSetOut.ThirdParty, tblSetOut.DateIn, tblSetOut.DateOut, tblSetOut.ThirdTimeIn, tblSetOut.ThirdTimeOut, (DateDiff("n",[ThirdTimeIn],[ThirdTimeOut]))/60 AS [Release if Greater than 24]FROM tblSetCont INNER JOIN tblSetOut ON tblSetCont.SetContInitials = tblSetOut.SetContInitialsWHERE (((tblSetOut.WoStat) Not Like "released" & "*") AND ((tblSetOut.ThirdParty)=True));
It opens up in read-only form that the user can print or exit out of.
What I need to happen is for the query to run based on the user's log-in name. There are three tables involved (tblSetOut, tblSetCont, and tblSecurity). The tbl SetOut and tblSetCont are joined at the field SetContInitials. The tblSecurity (field SC_NAME) is joined to tblSetCont at SetContName.
For the life of me, I cannot figure out how to capture the log-in name to filter the query.
Thank you in advance
Camille
View Replies
ADVERTISEMENT
Jul 26, 2007
I'm new in Databases and Access, so my problem is very simple.
I have a table with three fields: Name (Prim. Key), Start Date (Prim. Key) and Cost.
I want to obtain a query with this fields:
Name
Start Date
End Date (where the End Date would be one day before the next start date)
Cost
Thank you
View 1 Replies
View Related
Jul 12, 2005
I just started working for a company the other week and they threw this query onto my lap with an unrealistic deadline. My programming experience is primarily in VB6, so I am not completely familiar with coding Access queries.
I was given code that was written for SQL, and the programmer that came up with it is unfamiliar with Access, so I am stuck trying to decipher this. If anyone could help me out, I would greatly appreciate it, as I am thoroughly confused and don't know where to begin. Here is the programmer's original code:
while exists(select top 1 accNum from NoteFile where patindex('%' + char(10) + '%',dbtrref) > 0)
begin
--Insert note into table
insert into #TL19Note(AcctNumber, Note)
select accNum, (case when patindex('%' + char(10) + '%',
dbtrref) <= 0 then dbtrref else left(dbtrref,patindex('%' + char(10) +
'%',dbtrref)) end)
from NoteFile
--Delete note from Note String
update NoteFile
set dbtrref = right(dbtrref,len(dbtrref)-len(left(dbtrref,patindex('%' + char(10) + '%',dbtrref))))
where len(dbtrref)-len(left(dbtrref,patindex('%' + char(10) +'%',dbtrref))) > 0
--Delete rows with no more notes
delete from NoteFile
where len(dbtrref)-len(left(dbtrref,patindex('%' + char(10) +'%',dbtrref))) <= 0 or patindex('%' +char(10) + '%',dbtrref) <= 0
end
--Eliminates any that are CRLR or just spaces
delete from #TL19Note
where len(Note) < 10
--Update the date
update #TL19Note
set NoteDate =left(Note,patindex('% %',Note)-1),
Note = right(Note,len(Note)-patindex('% %',Note))
--No '@' means no time?
update #TL19Note
set NoteTime = '0000'
where left(Note,1) <> '@'
--delete the '@' - we know which ones have it because NoteTime is null
update #TL19Note
set Note = right(Note,len(Note)-patindex('% %',Note))
where left(Note,1) = '@'
--Update NoteTime, take time out of note
update #TL19Note
set NoteTime = left(Note,2) + substring(note,4,2),
Note = right(Note,len(Note)-patindex('% %',Note))
View 6 Replies
View Related
May 28, 2006
Hello, Really hope someone can help me.
I have 2 lots of info in 1 table - nameley customer address & posting address
I need to print a form that always has the posting address on the same side. but in some cases if the postal address is the same as the customer address then it is not filled in. hope this makes sense:
Please Im Really stuck
View 2 Replies
View Related
Nov 25, 2005
I'm a couple of years removed from Access and shaking off the rust. I hope someone can help with something that may be obvious but I'm missing.
I'm simply looking to pass the begin and end dates to a query driving reports. The calendar form includes unbound text boxes, txtBeginDate and txtEndDate. My code populates the text boxes correctly; the user clicks on the calendar date, clicks the calendar day, then the Begin (or End) Date control, and each populates the respective textbox.
But when I run the query or report, I'm prompted for the parameters. This is what I have in the query's Date field criteria:
Between [Forms]![frm_Calendar]![txtBeginDate] And [Forms]![frm_Calendar]![txtEndDate]
I'm just drawing blank on what I did several years ago to make this work. If anyone can help, I'm most appreciative.
View 6 Replies
View Related
Feb 26, 2007
I have a sales invoice table that contains parts that start with *, for example *SPR362.
I need to select only those parts that start with the *, as this is the wildcard in queries how do i select those products that start with it without it being recognised as the wildcard and selecting all records?
The field name is simply: Part
:o
Many Thanks
View 4 Replies
View Related
Mar 20, 2007
i am trying to run a query from a form which will bring up the no of days difference between the start and end date also on the same form.
The query doesn't bring back any results can someone please guide in what i am doing wrong.
Here is the query
SELECT DateDiff('d',[start date],[end date]) AS [no of days]
FROM [booked property]
WHERE ((([booked property]![start date])=[forms]![booking]![booked property]![start date]) AND (([booked property]![end date])=[forms]![booking]![booked property]![end date]));
Thanks
View 2 Replies
View Related
May 29, 2007
Embarrassingly, I'm not even to the point where I can ask a specific question about the query(ies) I think I need.
Here's where I'm starting from and where I want to go... maybe it will make enough sense for somebody to point me in the right direction.
I have sales data that contains line items for every item sold over the past X number of years. For each line, there are six key attributes that I'm concerned with.
For simplicity here's a scaled down example of the data for each line.
PART, PART_FAM, TRANS_DATE, FAM_GROUP, TRANS_AMT, OVS_CODE
For each attribute, there are at least five possibilities.
I have been asked to find monthly sales trends on about 20 unique combinations of these various attributes. An example might be, the monthly sales totals for:
TRANS_DATE = 1/1/06 to 1/31/06
PART_FAM = PIN
FAM_GROUP = 01xx
OVS_CODE = 2
Then a SUM for the TRANS_AMT.
I've set up a query that can give me the information I'm looking for one month at a time, but I want to believe there is a way to have Access do some of the grunt work, rather than me having to change the variables one by one and copy/paste each result into my new file.
Is there some reading or previous posts I could review that might get me thinking about this in the right way?
Thanks in advance!
View 2 Replies
View Related
Dec 19, 2005
Hi
I am a new user to Access. I created couple of forms using wizard, but when I view them, they show me all the available data by default. I want to stop this, if anyone can help me plz.
RMA
View 5 Replies
View Related
Jan 24, 2014
As the post title says, is it possible to force a query to start its table record search at the end of the table and go backwards? The table I'm searching has hundreds of thousands of records and I want to check if any new records have a field with a value that has already been imported into the table. The duplicates would most likely occur near the end of the table and not the beginning, so I see no reason to waste cycles searching records from the very first record in the table.
View 14 Replies
View Related
Mar 26, 2013
I've attached a stripped down version of a small order database I'm working on.
A user would enter an order, the amount and the date the order is required by.
As you can see from tbl_seasons, the business has financial periods that match the first and last 6 months of each year. Each season has a start date and end date.
What I'm trying to build are two queries:
1. A query which lists all orders and has an extra field which shows the "season_id" that the order (date) relates to (based one the start date and end date in tbl_seasons)
2. A totals query which shows the total order amounts by season
how I might build these 2 queries.
View 2 Replies
View Related
Nov 3, 2014
I have finger print machine and i already connect to it and get all log.then i tray to get data and here is the code that im using
SELECT Format(CHECKINOUT.CHECKTIME,"dd/mm/yyyy") AS CDate, IIf([CHECKINOUT.CHECKTYPE]=I,Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm")) AS StartTime, Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm") AS EndTime, USERINFO.USERID, USERINFO.Name, CHECKINOUT.CHECKTYPE
FROM CHECKINOUT INNER JOIN USERINFO ON CHECKINOUT.USERID=USERINFO.USERID
WHERE (((Format([CHECKINOUT].[CHECKTIME],"dd/mm/yyyy"))='10/04/2014'));
how i get end time due to CHECKTYPE]=O
View 1 Replies
View Related
Dec 19, 2007
This is my first project using Access so take it easy on me. I'm trying to convert the Excel application to Access since I think Access is more flexible/powerful. I'm not sure if this requires programming (VBA-over my head) or just need some complex formulas to get the mission accomplished.
The objective is to be able to copy and paste data from a customized form directly to Access. These data will automatically be added into a summary sheet based on volume and amount.
Thank you in advance.
AccessNewby
View 13 Replies
View Related
Feb 8, 2008
Im looking at creating a database which includes some sort of diary system but I havent got a clue where to start, how to structure the tables, etc.
I am new to our company so I am looking to streamline some of their processes. Basically there are 4 people in our department and at the moment we use Excel as a mini diary system for our work on a day to day basis (our company uses Lotus Notes not Outlook and the diary system is a load of cr*p, plus also I want to integrate this into a database I have already written for our developers). Going down the page we have a section for each week which contains 4 rows (1 for each person). There is then 5 columns in each section which represents Monday to Friday. Our office administrator then goes in each month and updates the dates manually for the entire month.
Do I need to have a row in my database for every day of the year or is it done in weeks? I did a search for Access diary threads but there doesnt seem to be much info and the example one on iSam seems to have been taken off :(
View 11 Replies
View Related
Dec 7, 2006
Hello all,
I am new to Access and I could really use some help to point me in the right direction. I want to organize my tables properly from the start so I do not run into problems down the road. If anyone can give me some advice on topics to read it would be a big help. Here is what I am doing so far.
My database must record warranty claims. A customer could have multiple warranty claims with multiple parts that failed. Each part can be linked to multiple failures but in a claim one part and one failure must be selected.
Example: A motor can fail in many ways but I need to know how it failed for this customer.
I would like to be able cascade the combo boxes so when a part is selected the failures related to that part are updated.
TblClients
ClientID AutoNum PK (1-many with tblMain)
CustomerName text
Address text
(rest of the customer data fields)
TblParts
PartID AutoNum Pk (1-Many with tblMain)
Part text
PartDescription text
TblFailure
FailureID AutoNum Pk (1-many with tblmain)
Failure text
FailureDescription text
TblMain
ClientID
PartID
FailureID
I guess my question is when I make a form based off TblMain, do I need a partfailure table to let me cascade my combo boxes?
Thanks for any help,
Mark
View 2 Replies
View Related
Jun 8, 2005
Is there a way to set where the different forms will start, like location wise on the screen, when they are loaded?
View 1 Replies
View Related
Jul 20, 2005
I've downloaded and installed the new SQL server 2005 express edition CTD (June ed.) along with the Express Manager.
How do i get an access database into SQL server?
Now that it's installed, what next? When i try to upsize, it asks me to choose a server, and gives 3 options, and i'm not sure where they come from. Where does this list come from? are they previous installations of the MSDE on my computer? are they servers that ar available over our LAN?
i read that the default name if an instance of SQL server express is SQLEXPRESS but that's not on the list...
do i need to create a new instance of SQL server on my computer to house the database?
I really just want to try it, to see if it's something we should do, but i can't get it to do anything at all. i don't know where to start...
I've done some searches, but nothing tells me where to start. I'm getting really frustrated with this....
Please help me...
View 2 Replies
View Related
Jun 12, 2006
Good day all. A bit of back ground, I've built a data base (with much help from the folks here) to track the training of my people. Someone way higher then me has decided to completely revamp our field training. There are now two "tiers" based on rank and training level. My first thought is to make two seperate tables for the information in each tier. What I would like to do is make the training specific to each tier show up on the form that I use to track this training based upon the persons rank. Ie an Airman would only show the tier one tasks and a Master Sergeant would show the tier two tasks. I'm thinking this could be done with a quiery but have no idea how to go about it. Any input or suggestions are welcome. Thanks in advance, Tim
View 6 Replies
View Related
Sep 5, 2006
Hi,
I unticked all the boxes in the Tools > start up window. I closed my database then reopened it. Now, I can't put these settings back again as I can't see the Tools tab.
Any help will be very much appreciated.
B
View 5 Replies
View Related
Apr 3, 2008
I have created one access application which will reside on server and many users will access it from there local PC. But whenever we start the application on local PC, it displays worning message that "Code is unsafe , it may harm your PC do you still want to run the code?" and another message box asking same question.
CAn we supress this worning? CAn we design the application in such a way that it will not ask such aquestions and will open application immidiatly when we double click the file.
Please reply ASAP. It's very much urgent...
View 3 Replies
View Related
Oct 4, 2005
Hi
This is probally really easy........
I have data with dates like 15/05/2005, 30/09/2005.
I need to convert the dates to 01/05/2005 and 01/09/2005
Can anyone help!
View 2 Replies
View Related
Jan 18, 2006
I have a query that is generating two colums, one the states the Start Date and the other that States the End Date. I need to display another column that displays the time difference between the two. Any ideas how?
View 10 Replies
View Related
Apr 20, 2006
How would you make two prompt boxes which ask for the start and end date so you can select all the data between the two dates...
[Start Date?] And [End Date?]
E.g., 01/01/2006 And 07/01/2006
So I can select all the data between that week. I also need to use this for the remaining weeks in January and February. This is really simple...gah. Thanks guys.
View 8 Replies
View Related
Oct 15, 2007
Hi All:given a table with, let's say, Job Numbers that start with a letter (such as RES2345) or just plain numbers (such as 253180001 or 9817) how can I set the criteria in the query to just give me jobs that start with a number?I first trimmed the field to eliminate blank characters and then I used the Not Like "A - Z" but it still gives me jobs with letters at the beginning of the name.thanks for all your help in advance. :D
View 1 Replies
View Related
Dec 14, 2005
Hello,
I have a button that runs a macro to delete records in 12 tables. I want to create a message box before that macro runs warning that you are deleting records in 12 tables and are your sure you want to run the macro.
I need a message box with an ok and cancel button. Where do I put the msgbox funtion in this code?
Thanks !!
This is my code:
Private Sub cmdRunDeleteMacro_Click()
On Error GoTo Err_cmdRunDeleteMacro_Click
Dim stDocName As String
stDocName = "mcrSemesterStartRecordDELETE"
DoCmd.RunMacro stDocName
Exit_cmdRunDeleteMacro_Click:
Exit Sub
Err_cmdRunDeleteMacro_Click:
MsgBox Err.Description
Resume Exit_cmdRunDeleteMacro_Click
End Sub
View 5 Replies
View Related
Jun 11, 2007
This may sound a bit silly, but my Access 2003 refuses to start.
I recently re-installed Office 2003 after a fresh installation of WinXP. Word, Excel etc work as normal. This is the message that comes up when I attempt to start Access:
"Please wait while Office 2003 Prof. Ed. configures. Required data is being determined"
after that nothing happens.
Any ideas?
Please note that I'm using the German versions of OS and Office. My translation probably doesn't match the original message.
Thanks in advance.
View 2 Replies
View Related