Search results

  1. B

    Check if a date lies in a timeframe

    Thanks Paul. It works now. Regards, Ben
  2. B

    Check if a date lies in a timeframe

    Thanks Namliam, I'm such a fool. I also found out that this Exit Sub is not so useful, if I want to do other things after the loop. Can you tell me how I can exit from the Loop? Thanks.
  3. B

    Check if a date lies in a timeframe

    Hi all, I wanna check the regarding time frame of given date. Somehow the comparison doesn't work out. pricedate is a given date selected by the USER. I tried following: Public Sub TEST() Dim db As DAO.Database Dim rs As DAO.Recordset Dim start_date As Date, end_date As Date Dim a As...
  4. B

    Syntax issue with the filter in DlookUp

    Paul, I found it out. The issue was with the Column YEAR, I changed it in Text format. Now it works. Thank you anyway, you helped me out many time. Regards, Ben
  5. B

    Syntax issue with the filter in DlookUp

    Hello Paul, Debug Print give me the right results: b = 2014 RepMonth = 012014 Coulmn YEAR in the Plan_FX_RATES table is a number column, is this maybe the issue?
  6. B

    Syntax issue with the filter in DlookUp

    Hi all, something is wrong with my syntax. Does anyone has a clue? If I type 2014 instead of b everything works out. RepMonth is 012014. Dim a As Double Dim b As String b = Right(RepMonth, 4) a = DLookup("[EUR/TRY]", "Plan_FX_RATES", "YEAR = '" & b & "'") Debug.Print a Debug.Print b...
  7. B

    Syntax error - variable not found

    Dear all, somehow it doesn't take this variable msoFileDialogSaveAs. It tells me it's unknown. Does someone has an idea what is missing? Thanks in advance. Regards, Ben Public Sub Command2_Click() On Error GoTo MyError3 Dim filelocation As Variant Dim g As Object Set g =...
  8. B

    Select a date given in a form

    Now it worked. The date form was not updated. Thanks all for your help.
  9. B

    Select a date given in a form

    You are rigtht namliam, the date has another format, it's like 23.05.2013. I tried this, without success :( " Where [Valid to] < " & Format(a, "\#mm\/dd\/yyyy\#") It shows me in the debug window: SELECT TRP.* INTO [TEST] FROM TRP Where [Valid to] < #12/30/1899# Although enddate is...
  10. B

    Select a date given in a form

    Can I use the variable a ? I really don't know how to the syntax should look like.
  11. B

    Select a date given in a form

    Thanks Paul, for the hint with Optıon explıcıt.I've done that now. However it still doesn't work out. I trıed this : " WHERE Where TRP.[Valid to] < #" & Forms!enddate & "#" Can you help me with the syntax?
  12. B

    Select a date given in a form

    I've added this in the form code: Public Sub enddate_AfterUpdate() Dim a As Date a = Me.enddate End Sub And then tried this in the program module: Option Compare Database Public a As Date Public Sub test() DoCmd.SetWarnings False DoCmd.RunSQL "SELECT TRP.* INTO...
  13. B

    Select a date given in a form

    I've tried somethings from the list you provided me. My main form is called TEST. The enddate is selected in a text field appearing in the form Test. I tried: Test.enddate Test.control.enddate. Nothing worked :(
  14. B

    Select a date given in a form

    Basically I want the user to decide which timeframe of data he wants to use later on.
  15. B

    Select a date given in a form

    Paul, I will use two different forms one for startdate and the other for enddate. How will it look like with the full form property?
  16. B

    Select a date given in a form

    Hi Paul, thanks so far. It still shows me the warning message: Inappropriate usage of keyword Me Do I have to declare something before I can use this Me. ...?
  17. B

    Select a date given in a form

    Hi all, I want to select a subset of table called TRP. It should extract me all records which got the property Valid to date < enddate. enddate is a date selected by the user in a form . Somehow it doesn't recognize the enddate in the following : Public Sub test() DoCmd.SetWarnings False...
  18. B

    Drop blank tables

    Thanks lagbolt, that's exactly what I needed. Now it works. Thanks again. Regards, Ben
  19. B

    Drop blank tables

    I used your advice. Now it tells me that it can't delete the FORM TEST in the database, while it's open. I forgot to mention that I got a form called TEST in the database. Somehow it tries also to delete this form, although it's not blank. Can I select only tables as an object or add the...
  20. B

    Drop blank tables

    Hi Paul, thanks for your quick reply. I tried this, however it couldn't find the obj with: If DCount("obj") = 0 Then DoCmd.DeleteObject Else If Left(obj.Name, 7) = "NEW_TRP" Then DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, obj.Name...
Back
Top Bottom