Search results

  1. S

    Printing without a print dialog box appearing

    That didn't help with the print dialog. The link took me to a search results page. Which link is the answer.
  2. 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?
  3. S

    Use Like from another table as criteria

    This data comes daily from corporate. It is pulled into a table called "tblMain". I want to remove any records from these foreign countries before processing the data further. I need to look at it first before deleting it though because the customer could be from Moscow, Kentucky instead of...
  4. S

    Use Like from another table as criteria

    I could do it the way to just showed you, but it would mean going into the query to add a country instead of a user being able to input one into the tblReference table. Big difference in being user friendly. :)
  5. S

    Use Like from another table as criteria

    I actually don't use many of the fields such as the checkboxes, Barcode and Address3. These are used by our other companies. Strange that it works if I input the string to look for.
  6. S

    Use Like from another table as criteria

    If a write the variables into the SQL rather than selecting the list from tblReference, it works perfectly. Here's the SQL SELECT tblMain.dtDate, tblMain.Company, tblMain.Attention, tblMain.FName, tblMain.LName, tblMain.Address1, tblMain.Address2, tblMain.Address3, tblMain.City...
  7. S

    Use Like from another table as criteria

    Attached is the txt file. These files come in daily from our corporate office. We have no say in the layout.
  8. S

    Use Like from another table as criteria

    Unfornately this is the way the data is coming into us from the customers. Not sure the best way to separate without doing it manually. Not really an option.
  9. S

    Use Like from another table as criteria

    That's the data at the bottom of my last post. Kurgan Russia 640006 Makeevka-ukraine Belaya Tserkov Kiev Region Ukraine Zhlobin Kharkov Ukraine Dzhankoj Ukraine Thanks.
  10. S

    Use Like from another table as criteria

    Here's the SQL SELECT tblMain.dtDate, tblMain.Company, tblMain.Attention, tblMain.FName, tblMain.LName, tblMain.Address1, tblMain.Address2, tblMain.Address3, tblMain.City, tblMain.State, tblMain.Postal, tblMain.Country, tblMain.Cat, tblMain.Sample1, tblMain.Sample2, tblMain.Sample3...
  11. 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...
  12. S

    Switch function problem

    Here's the updated switch function. This should contain all possible combinations. MPP: Switch([CurPt]>0 And [CurOd]=0 And [CurMn]>0,([CurMn]/[CurPt]),[CurOd]>0 And [CurMn]>0 And [CurPt]=0,([CurMn]/[CurOd]),[CurPt]>0 And [CurOd]=0 And [CurMn]=0,0,[CurPt]=0 And [CurOd]=0 And...
  13. 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...
  14. 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...
  15. S

    DLookup Issue in VBA

    Got it working by running the Dlookup through the textbox control source instead of VBA. Same code works there. Weird. Thanks for the help!
  16. 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...
  17. S

    SQL statement in VBA

    I've just attached a stripped down version of the database with all relevant tables, queries, forms, and VBA.
  18. S

    SQL statement in VBA

    qryOCParts1 uses the field name SumOfCount.
  19. S

    SQL statement in VBA

    I was using SumOfCount as the name for the counts sum. Its called count in qryOCParts but called SumOfCount in qryOCParts1 because I'm getting a daily total. Does that make sense or am I missing something? (Which is verrry possible)
  20. S

    SQL statement in VBA

    When I run the code now, here's what I get. Run-time error '3075': Syntax error in date in query expression 'qryOCParts1.EndOfWeek=#[Text150]'. Here's what shows up in the Immediate window. SELECT Sum(qryOCParts1.Count) AS SumOfCount FROM qryOCParts GROUP BY qryOCParts1.EndOfWeek HAVING...
Top Bottom