Search results

  1. A

    Text field and IN clause

    Strange issue but I have a couple of check points in my mind which could be your solution: 1) Please make sure qry_maindata is showing all your records. 2) Check your data to make sure you don't have any unprintable character with country name. To check, copy any of your country name which is...
  2. A

    Search bar filtered by different columns

    Concat all your fields like below and then use that field as criteria. SELECT EmployeeID, EmployeeName, DOB, Address, City, State, Zip, Cell FROM tblEmployees WHERE EmployeeID & "|" & EmployeeName & "|" & DOB & "|" & Address & "|" & City & "|" & State & "|" & Zip & "|" & Cell "'*" &...
  3. A

    Count all records in a query?

    You could use this too: SELECT [ID], [Claimnum], [Precall], Count(*) AS [Pre Call Totl Count] FROM Reviwshttable GROUP BY [ID], [Claimnum], [Precall]
  4. A

    DLookup with Multiple Criteria

    Okay, is any of your control has null value? Could you please post the datatype of the criteria fields?
  5. A

    DLookup with Multiple Criteria

    Hi, Use this: =DLookUp("Date","qryDatePosition","DOWPosition='1S aturday' AND Month=" & Forms![frmCalendar]![cboMonth] & " AND Year=" & Forms![frmCalendar]![cboYear]) Please note: If Month or Year is a string datatype, you have to pass the criteria from form within apostrophe ('') like you...
  6. A

    Applying a different query to a list box

    Hi, Write this code to the button click event: ListBox.RowSource="YourQuery"
  7. A

    swap rows and columns in a query

    Query Batman! Nice Minty :) Colin, yes, there is a limitation for UNION in Access. I think we can use 50 times. Of coaurse it's tedious to type but I used Excel to create the line items. It was easy and quick job.
  8. A

    swap rows and columns in a query

    Hi there, You can use UNION ALL to do this kind of job. Here is the query: SELECT [00/01/1900] as [Date], '02' as UnitNumber, [02 x 01] as [KM] FROM [Accumaltive KM] UNION ALL SELECT [00/01/1900] as [Date], '04' as UnitNumber, [04 x 03] as [KM] FROM [Accumaltive KM] UNION ALL SELECT...
  9. A

    Criteria for "Today" when Date/Time

    Use Int([YourDateField])=Date(). Int will help you to convert a datetime to date.
  10. A

    Access Date Query

    Hi Juliette, Check this out http://prntscr.com/eyqpk5
  11. A

    Access Date Query

    Hi, Try this: Select StockCode, Min([Date]) from YourTable GROUP By StockCode
  12. A

    Keyword search Form based on Union Query

    Could you please check if there is any data with that criteria? Also, add Me.Requery after setting the RowSource and see if anything shows.
  13. A

    Start/End dates get week numbers

    Hi, Try this query. You will get what you want. This should not result any duplicates until and unless you have any duplicate data. Select * from YourTable WHERE EndDate between Date() and DateAdd("m",6,Date()) OR StartDate between Date() and DateAdd("m",6,Date()) OR (StartDate<=Date()...
  14. A

    Keyword search Form based on Union Query

    Hi, Use where clause for each SELECT statement or you can write this as nested query something like this and use WHERE clause for whole results: Sql = "Select t.* from (SELECT [DDP Issue Control].[DDP Ref] AS [Document Number], [DDP Issue Control].Description, [DDP Issue Control].Part AS...
  15. A

    Date Query Criteria

    Hi, DateValue returns '#Error' with null value. To avoid null value you can write your query like DateValue(CDate(Nz([CreatedDate],0)))=Date() and this works fine.
  16. A

    Calculating Time difference in hours between 4 fields

    The Start time field has date and time both instead of only time. So, you need to extract only time and apply them into your calculation . Try this: Result: Format(DateDiff("s",Int([Start date])+([Start time]-Int([Start time])),Int([Completed date])+([Completed time]-Int([Completed...
  17. A

    How to format date values in query criteria to search for short date

    Use this in your VBA code. If IsDate(Me.txtStartDate) = True Then Criteria = Criteria & "([CreatedDate] >= #" & [Forms]![frm_search_comments]![txtStartDate] & "#) AND " End If If IsDate(Me.txtEndDate) = True Then Criteria = Criteria & "(CDate(Int(NZ([CreatedDate],0))) <= #" &...
  18. A

    MS Access runtime won't open DB

    Hi, Open you database in a full version with shift key and then press ALT + F11 together and you will be able to go into the VBA code window. Then click on Debug --> Compile Database. This process will compile all your VBA code. It will highlight your error code. Keep doing this process untill...
  19. A

    Insert INTO SQL with File Dialog

    Hi, You can use below query to do such job. Let us know if this works for you. Run this to update your selected database: INSERT INTO [MS Access;DATABASE=" & YourSelectedDatabasePathGoesHere & ";].[F15] ( SERVICE, YEAR, DUTY) SELECT F13.SERVICE, F13.YEAR, F13.DUTY FROM F13; Run this to update...
  20. A

    Issue With Import Data to Sharepoint

    Hi, The issue described itself. You cannot run an INSERT query with containing a multivalue field. The table has one or more multivalue fields. If you just ignore them in your INSERT query, you will be fine. This is nothing related to Sharepoint I believe. You can update multivalue field using...
Back
Top Bottom