Recent content by Drevlin

  1. Drevlin

    Please check my vb code

    If you are checking to see if your value is in the table after you've updated the value then it will always find it there (the one you just input). Either change your code to say > 1 or place the code into the BeforeUpdate.
  2. Drevlin

    Compile Error: Expected: =

    I don't believe the problem is with your function. The problem is more likely with how you call the function. If you're calling your function like this: Sub RunFunction() Import_Reports("Highland Import Specs", "tblMyTable", "c:\windows\desktop\adhocrpts\") End Sub You will get the...
  3. Drevlin

    Controlling the ESC key

    The easiest way to figure out what keycode goes with what key is to try the following: Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer) MsgBox KeyCode 'or Debug.Print KeyCode End Sub
  4. Drevlin

    problem with '.selected' property

    You should be able post your demo database (as long as it's not too large) by changing the file type to .Zip. As long as the system Thinks it's a .zip file it will accept it to be posted. Just make sure that people know to change the ".zip" to ".MDB" after they download it.
  5. Drevlin

    Running Macro In Another Database

    First glance impression.... (so I have no idea if what I'm saying is true) but, shouldn't you have a (.) dot modifier before DoCmd? With db .DoCmd.RunMacro ("AUTOEXEC1") End With Otherwise the code will assume you're calling the macro from your current database.
  6. Drevlin

    Does anyone know how to create a temporary table??

    Well this may be a little bit extreme... but you could set up a temporary database, create the table inside that database, link to it run your program and then destroy the temp database. That would solve your problem and not affect the size of your original database.
  7. Drevlin

    Simple Sub Procedure for Form operations

    What line is giving you the "Invalid Outside Proceedure" Problem that you mentioned? It sounds as if a public proceedure held in a module would work for you but that it needs to be tailored a bit to make it work appropriately. More information on the code itself would be helpful.
  8. Drevlin

    Does anyone know how to create a temporary table??

    Perhaps just place the information into an array? Are you saying you have a reason to not create a table using ADO/DOA, fill the table, and then destroy the table when you're code is completed?
  9. Drevlin

    temporary screen size

    Try this thread: http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=34688
  10. Drevlin

    Using variable to refrence field

    It sounds like you just need to set up your main subroutine to accept a variable and then have your buttons pass their variables to it: Private Sub Button70_Click() myProc 70 End Sub Sub myProc(lngNum as Long) matchRecord = "SELECT * FROM Matches " _ & " WHERE weightClass = " & lngNum & "...
  11. Drevlin

    **AfterUpdate Question**

    This depends on what you mean by: No user intervention It also depends on which OnUpdate your talking about. If what your saying is that you have code in your second Form's OnUpdate that you want to be called by your first form then you could do one of two things: 1. Remove the Private...
  12. Drevlin

    Word Macro - Running one from Access?

    The "wd" words are Constants. Make sure you have a reference to Microsoft Word set. Tools-> References -> Microsoft Word X.0 Object Library Otherwise just figure out what the Constant is equal to in Word and switch it out in Access (you can do this by typing Debug.Print wdConstant in the...
  13. Drevlin

    VBA Query..

    Ok... threw me for a loop there for a second... Take the calls to your form's text boxes out of the quotes: strSQL = "SELECT Count(InputID) AS TotDays FROM tblInput " strSQL = strSQL & "WHERE ((([tblInput]![InputDate] Between #" strSQL = strSQL & [forms]![frmChoose]![StartingDate] strSQL =...
  14. Drevlin

    VBA Query..

    To help you out in the future: it's always easiest to build your query in query design mode and then convert the SQL to your code. That way you don't have to mess with trying to figure out the parenthesis.
  15. Drevlin

    VBA Query..

    Try this: strSQL = "SELECT Count(InputID) AS TotDays FROM tblInput " strSQL = strSQL & "WHERE (([tblInput]![InputDate] Between " strSQL = strSQL & "[forms]![frmChoose]![StartingDate] " strSQL = strSQL & "AND [forms]![frmchoose]![EndingDate]) " strSQL = strSQL & "AND ([tblInput]![UserID]= "...
Top Bottom