Search results

  1. S

    Printing without a print dialog box appearing

    I'd like to directly print a report from a button on a form. I want to click the button and the report just prints to my default printer without any other user interaction. Currently the print dialog appears but I don't want it. Any ideas?
  2. S

    Use Like from another table as criteria

    I have a query to which pulls data from certain foreign countries. The country data comes in through the city field in my table [tblMain]. I have a reference table [tblReference] with a list of countries [ForeignCountries]. This list is constantly being updated. I set my query criteria to...
  3. S

    Switch function problem

    I'm trying to get the Minutes per part using the switch function or minutes per order if parts are zero. Here's the function: MPP: Switch([CurPt]>0 And [CurOd]=0 And [CurMn]>0,([CurMn]/[CurPt]),[CurOd]>0 And [CurMn]>0 And [CurPt]=0,([CurMn]/[CurOd]),[CurMn]=0,0,[CurPt]=0 And [CurOd]=0 And...
  4. S

    Question Username field not filling

    I have a form in MS Access with a control that prefills on startup with the current username from Windows. I have a module. Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Function fOSUserName() As String...
  5. S

    DLookup Issue in VBA

    I have a form where I select a date from an unbound combo box (Combo80). * This is a list of week ending dates. When a date is selected I need Text16 to fill with the total for that date from qryOCParts1. Here's sample data from the table referenced. SumOfCount EndOfWeek 3644...
  6. S

    SQL statement in VBA

    I have an unbound form 'frmWeeklyReprints" with an unbound date field "Text150". I also have a query "qryOCParts1" with sum totals based on another query "qryOCParts" to get totals for each day. I'd like to select a date from Text150 and through VBA query qryOCParts1 to pull the matching date...
  7. S

    Previous week if first of the year

    I have some queries which pull data from the previous week using the DatePart function for the week and year which always works fine. My problem is when the week is the first week of the year. Any help is greatly appreciated. Here's my SQL SELECT DISTINCT tblReprints.EmpName...
  8. S

    Individual records printing on same page.

    I have a report where each individual's data is printed on a page. For most of the records this works fine. But a few display on the previous individuals page. The report is grouped by individual and set to keep header and first record together on one page. I've also tried keep whole group...
  9. S

    Switch Issue

    I have a query which is using a switch function to perform a calculation. The problem is the result is #Num! and I can't figure out why. This is the function. MPP: Switch([CurPt]>0,[CurMin]/[CurPt],[CurOd]>0,[CurMin]/[CurOd],[CurMin]=0,0). I've attached the DB. The query in question is...
  10. S

    Exclude time range from query

    I have a table with a field [RequestTime] that has a date/time datatype. I need to query so it only includes data between 7:30 a.m. to 11:55 a.m. and 12:30 p.m. to 4:00 p.m. I've used the between criteria, but it only pulls the current date. I need all data between these times not just todays...
  11. S

    Offer combo box choices based on current value of combo box in MS Access

    I have a form with a combo box [cboStatus]. The combo box has the following values. Need, Active, Complete, Out, Ordered, Received, Transfer and Void. I would like to display specific values in the combo box based on the current value. For example, if I go to a specific record and the status...
  12. S

    Remove duplicate values from different fields

    I have a linked table that is appended daily to the database. This table has fields such as [dtDate], [FName], [LName], [Address], [Sample1], [Sample2], [Sample3], etc up to [Sample10]. Yes, I know, not my idea. :) I need to remove duplicate samples. The thing is sample1 and sample4 could...
  13. S

    Prevent data entry if table contains record with same field value

    I have a table (tblOOS) that contains fields (Stock) and (Status) as well as others. I also have a data entry form to enter a new record. I would like to prevent the data entry if a record with that stock number already exists and the status is not "Complete". If the status is "Complete"...
  14. S

    Query records more than 30 minutes old

    I have a table with records that I would like to run a append query which appends records to another table and deletes from this table if the status = "Complete" and the CmpltTime is >= 30 minutes. The CmpltTime is a default value based on the system time that is autofilled. How can I set the...
  15. S

    Split multiple fields into individual records

    I have a table with data populated daily from another system. The table displays data this way. FName, LName, Address, City, State, Postal, Cat, Sample1, Sample2, Sample3, etc. Each record can contain up to 10 samples. I would like to store the data in two tables like this so each sample...
  16. S

    Export query with form parameters to .csv file

    I'm not sure if this is the right forum to post this question but. I have a table with particular data that I want to export to a comma delimited file. The parameter values may vary daily. I have a query which utilizes parameters from a form tied to a table so the parameters are stored. I'm...
  17. S

    Problem with Switch

    I've been trying to get this switch working for a while now. I keep getting the error "The expression you entered contains invalid syntax, or you need to enclose your text data in quotes". Prt: Switch([Cat]="ABB" And [ABBSam]="-1","Yes") , ([Cat]="Brett" And [BrettSam]="-1", "Yes") ...
  18. S

    Pass through within a pass through query

    I have a MS Access frontend linked to a SQL server backend storing the tables. I've created some pass through queries within Access and established a connection string, which are all working perfectly. Now my problem is that I need to create more pass through queries which reference the...
  19. S

    Subreport showing under wrong report

    I have a report that lists the progress of each employee. Within this report, I also have two subreports. The tables are linked by employee name. Most of the employee reports print perfectly. But I have one individual who doesn't print on the main report. The thing is that this persons...
  20. S

    Switch Function too complex

    I'm trying to use a switch function to score individuals. It calculates a score based on LlSl (a skill level), and falling with this range LlNeMPO (Minutes per order) to get LlPrRa (Score). This switch function produces the error "The expression you entered is too complex." Any workarounds...
Top Bottom