Search results

  1. S

    Query to concatenate records in a table with no key

    Hi, It is possible to do. You will need to create a function in VBA that you are gonna use as an "agregate" function in a query. It is slow to run but does the job. I'll post the code in a couple of hour if no one as a solution until then. (I can't access it from this computer...). I think...
  2. S

    Working Day - Idiots Guide?

    Hi, I'vo got these two functions which might help you out. Thing is they are coded in French so you might need to translate to something more meaningful to you. Jour = Day, Ouvrable= Working, Delai = Delay, Debut = Start Public Function JourOuvrable(dtDate As Date) As Boolean Dim...
  3. S

    Change format of name?

    Hi, This function will do the formatting: Public Function FormatName(strName) As String Dim intPos As Integer Dim strLeftPart As String Dim strRightpart As String intPos = InStr(strName, ",") strLeftPart = Left(strName, intPos - 1) strRightpart = Right(strName, Len(strName)...
  4. S

    Specify the table containing the records you want to delete in access 2007

    Hi, Here is how I would do it: DELETE * FROM Promo WHERE Promo.Out IN (SELECT Outlet.Out FROM Outlet) Simon B.
  5. S

    Finding the location of a database

    Hi, This should help you : http://www.access-programmers.co.uk/forums/showthread.php?t=48192 What you will need to do is get your location like you did but convert the c: to the UNC path with this function: fGetUNCPath() Hope that helps. Simon B.
  6. S

    Deleteing Folders in a Set location with a specific date format

    Hi, The same method would work but I would first try that: FSO.DeleteFolder subFolder.Path & "\*.*" FSO.DeleteFolder subFolder.Path That should empty the folder before deleting it. I'm not sure if you need the \ though, you'll need to test it. If that doesn't work, adapt the loop for the...
  7. S

    send email with results of query

    Hi Ian, In a module on in a button click event code: Dim rst as DAO.Recordset ' I use DAO you can use ADO if you want I'm not gonne debate it now. Set rst = CurrentDB.OpenRecordset(your_query_in_SQL) While Not rst.EOF strBody = strBody & rst!Field_Name & vbNewLine ' Append to your...
  8. S

    Deleteing Folders in a Set location with a specific date format

    Hi, Here is what you need to add: dim subFolder as Folder dim dtDate as Date Set Folder = FSO.GetFolder(ImagePath) ' That will get you the current date - 6 months dtDate = DateSerial(Year(Date), Month(Date) - 6, Day(Date)) ' Loops through sub-folders For Each subFolder in...
  9. S

    send email with results of query

    Hi, Open you query in a recordset and loop thhrough it to create a text string of your values that will become the body of your email message. Let me know if you need more details. Simon B.
  10. S

    Reports from an update query

    Hi, I can't think of a way to do that in one step so here is my suggestion: Select the records which you want to update. Keep them into a temporary table. Print your report based on this temporary table. Update the records that figure in your temporary table. At first, I thought about...
  11. S

    Dynamic Where statement

    Hi, I'd try something like this: select * from transactions_details where format(trans_date, [Forms]![fmrName]![YourComboBox]) = format(date(), [Forms]![fmrName]![YourComboBox]) Simon B.
  12. S

    Update Query: Replace data with data from other table

    Hi, try this: UPDATE QREVALUE, SkpiProblemLog SET QREVALUE.ScrapTagRecord = SkpiProblemLog.ScrapTagRecord WHERE QREVALUE.TagNumber = SkpiProblemLog.TagNumber Simon B.
  13. S

    Variable Citeria

    Hi, Something similar once happenned to me. I have no explanation why but here is how I "solved" the problem: -Create a new query. -Copy the SQL expression of the "broken" query to the new one. -Rename things accordingly. If that doesn't help then I have no idea... Simon B.
  14. S

    Select Into Value From a form

    Hi I think you best bet would be to create the table in the current DB and then export it to the target DB Insert someyhing like this your button click event: strQuery = "SELECT ... INTO [" & table_name_textbox & "] FROM ... WHERE ... = '" & table_name_textbox & "'"...
  15. S

    I really need help in sovling this problem

    Hi, I do not have a solution for you problem since I can't figure out on which fields you could possibly group. Would it be possible for you to have the check in and check out in the same record (IN_DATE, IN_TIME, OUT_DATE, OUT_TIME) ? That would make things a LOT easier.
  16. S

    Switching from Access To Oracle

    Honestly, I'm not too sure. But I can explain. When you link your tables, it acts as if they were local. If you do a query on a table that is linked, the server will send you the whole table. Then Access will do whatever you asked and show the result. Ex: you will received a 500,000 record...
  17. S

    Switching from Access To Oracle

    Hi, I think everything should be working, except for one thing you will have to check. The Oracle tables don't have the 2 GB limit, however I'm not sure what will happen if you try to open a recordset in VB on a larger table. I don't know if it is even possible, but linking the tables to...
  18. S

    formatting a date

    You're welcome! Simon B.
  19. S

    formatting a date

    Hi, Try that: In VBA: If Day(my_date) <= 16 Then my_date = DateSerial(Year(my_date), Month(my_date), 16) Else my_date = DateSerial(Year(my_date), Month(my_date) + 1, 16) Endif In SQL: IIf(Day(my_date) <= 16, DateSerial(Year(my_date), Month(my_date), 16), DateSerial(Year(my_date)...
  20. S

    Last record in Query

    Hi, There is possibly other solutions, but one would be to add an autonumber field to your table. You then change you query to order it by that field. That way it SHOULD always be in the correct order. Another thing, make sure you do your DAO.Update before running the query. Hope that...
Back
Top Bottom