Search results

  1. Surjer

    Commenting Code

    There is a toolbar for edit.... (Perfect for what you want) cause you can un-comment large groups also - I think this has always been avaiable?
  2. Surjer

    vbYesNo Popup If Field is null or not in list

    Your function will return an integer representing the answer they choose.. Constant Value vbOK 1 vbCancel 2 vbAbort 3 vbRetry 4 vbIgnore 5 vbYes 6 vbNo 7 Change your module to look like this Public Function Emptyplace() As Integer Dim msg, button, title, response msg = "You did not enter in...
  3. Surjer

    Delete - No Record Selected

    Just a thought... Does your form have a valid recordsource?
  4. Surjer

    Lifetime of a module level variable

    Is the variable dimensioned with Dim or Public ? If it is Dim'd inside of an event such as Form_Load its only good for the duration of the event. If it is Public and you are having troubles with keeping the value set then add a watch and see where your error is. PS - you can edit your post...
  5. Surjer

    Lifetime of a module level variable

    Right Click on the variable and hit "Add Watch" and then check "Break When Value changes" This will let you know when it changes.. HTH
  6. Surjer

    Import data (transfer) from excel and exclude some coloumns/rows

    'Disable the warnings DoCmd.SetWarnings False 'Create a new Recordset Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset 'build the recordset fields With rs 'add some fields .Fields.Append "NumberField", ADODB.DataTypeEnum.adDouble...
  7. Surjer

    Help in writing a simple function

    Dim db As DAO.Database Dim rst As DAO.Recordset Do while not rst.eof rst.Fields(1).Value = CalcShare(rst.Fields(0)) rst.movenext Loop Public Function CalcShare(arg1 As Integer) As Double CalcShare = arg1 * 10 'Should return the result as (arg1 * 10) END Function Good Job - that was very close...
  8. Surjer

    Import data (transfer) from excel and exclude some coloumns/rows

    Hmmm - Well, I dont think you can do exactly what you are trying to do. I hate that you can't define the fields when you are importing excel files. Any way you can save the excel files as *.csv files? Ahh - thats too much work. I would seriously create a temp table and just define the...
  9. Surjer

    The vba code that won't go away!

    you beat me to it - I was gonna say create a new blank database and then just import the forms tables queries and reports that you want. Glad you got it fixed...
  10. Surjer

    TransferSpreadsheet acImport and RunApp

    This is how I did it. This is in VB.NET but you can probably tweek it to work in VBA... SKILL LEVEL: MEDIUM In the event that you want to search... Dim WithEvents FileLoader As FindDownloads Dim letterNUM As Short Dim fso2 As New Scripting.FileSystemObject...
  11. Surjer

    Import data (transfer) from excel and exclude some coloumns/rows

    Already Discussed Topic less than a week ago SEARCH
  12. Surjer

    Prob with Update Code

    What version of access? You probably need to add a reference to DAO. Search the boards for MISSING REFERENCE DAO - I am sure 100000 post will pop up..
  13. Surjer

    Monthly Append Query automated

    you can create an autoexec macro that does what you need and then setup a scheduled event in windows to open it up. ?? Just a thought - there's probably a better way...
  14. Surjer

    Using Modules to Neaten My Code...

    Place this code in a module called anything... Public Function MyNewFunction(ByVal intSubCat As Integer, ByVal lngContractID As Integer) As Boolean On Error GoTo MyNewFunctionERRHand Dim strSQL As String strSQL = "SELECT TBLContractSubCat.ContractID...
  15. Surjer

    ADO connection-recorset problems

    Dim Conn as new ADODB.Connection 'DSN Conn.Open "DSN=mySystemDSN;" & _ "Uid=myUsername;" & _ "Pwd=myPassword" 'File DSN Conn.Open "FILEDSN=c:\somepath\mydb.dsn;" & _ "Uid=myUsername;" & _ "Pwd=myPassword" And then for the recordset you do...
  16. Surjer

    TransferSpreadsheet Range

    I created a temp table that has all the fields and then an append query to transfer the data from temp to finalTable and then empty the temp table...
  17. Surjer

    SQL Statement help

    No file attached :confused:
  18. Surjer

    Select Record Statement #2

    I just emailed the DB back to ya - chr(34) is a double quote - the same as """ I just like to use chr(34) Jerry
  19. Surjer

    Select Record Statement #2

    There was a typo - This works and has been TESTED... StrSQL = "SELECT * FROM EnrollmentInformationTable " & _ "WHERE EnrollmentInformationTable.EmployeeSSN = " & Chr(34) & Me.SSN & Chr(34) & _ " AND EnrollmentInformationTable.EmployeeLastName = " & Chr(34) & Me.EmployeeName & Chr(34)
  20. Surjer

    Select Record

    Mechele, Did this not work? What is the data type of the SSN field?
Back
Top Bottom