Search results

  1. nschroeder

    Stuck with my code

    Elequently stated. I was gonna say it means Not Equals :)
  2. nschroeder

    Runtime error 9 - Subscript out of range

    I'm guessing that you are working with two different instances of the Excel application object. Hopefully I have my terminology right. For example, if you select the Start button, open the Excel application, and open temporary.xls from there, then repeat that process for test.xls, you will have...
  3. nschroeder

    Select Case? Not sure how to do this?

    I discovered the Split function on this forum a few weeks ago, and it would be perfect for your needs. Remember that the TimVal array it produces is zero-based. I haven't tested this code, but it should be close. Use the debugger to tweak and check results. Have fun! Sub GetTimeVals Dim db As...
  4. nschroeder

    Runtime error 9 - Subscript out of range

    Maybe try working with the two workbooks independently (outside of Access) and just get the Vlookup to work, then go from there a step at a time until you find out what triggers the problem.
  5. nschroeder

    Stuck with my code

    If Me.txtEmployeeKey.Value <> DLookup("[EmployeeKey]", "tblEmpKey", "EmployeeKey ='" & [EmployeeKey] & "'") Then MsgBox "Thank You for Registering" DoCmd.close DoCmd.OpenForm "Form1" Else MsgBox "Incorrect Employee Key Or Username already in use", vbOKOnly, "Incorrect Infomation"...
  6. nschroeder

    Sum data and update table

    Excellent! That was my hope :) Could you post the code that did work? It might help someone else in the future. Thanks.
  7. nschroeder

    Stuck with my code

    If Me.txtEmployeeKey.Value = Me.txtEmployeeKey.Value Then Please explain how the above condition could ever produce a False result.
  8. nschroeder

    Stuck with my code

    Your If statement will never hit the Else. It's impossible for Me.txtEmployeeKey.Value to ever not = Me.txtEmployeeKey.Value. You need to define a separate variable to return the Dlookup value to, or just combine it into one line: If Me.txtEmployeeKey.Value = DLookup("[EmployeeKey]"...
  9. nschroeder

    Report Page Footer Duplex on Back of Page?

    I tried putting a page break in the report footer, but it didn't have any affect. I would suggest moving your Terms and Conditions to the bottom of your Detail Totals section, preceeded by a Page Break control. Of course, this would only work if your detail and detail totals all fit neatly on a...
  10. nschroeder

    Open different forms from one ID number

    If the ID number is a textbox, then it might not work well to make it happen by clicking in the box, but if that's what you want, this should do it: Private Sub ID_Click DoCmd.OpenForm (frmCustomerDetails) DoCmd.FindRecord Me.ID.Value DoCmd.OpenForm (frmOpportunitieDetails)...
  11. nschroeder

    use multiple extended lisboxes to filter a report

    Assuming the code you have works when all three are selected, try replacing this code 'Omit the last argument DoCmd.OpenReport strDoc, acViewReport, , Wherecondition:=strWhere & " AND " & strWhere2 & " AND " & strWhere3, OpenArgs:=strDescrip & " " & strDescrip2 & " " & strDescrip3 with...
  12. nschroeder

    Sum data and update table

    I have not tested this, and my code has never been known to work the first time :(, but this should be a good start. It's the Click event of a button named Sum. Private Sub cbSum_Click() Dim db As Database, rsMo As Recordset, rsYr As Recordset, i As Integer Set db = CurrentDb() i = 1...
  13. nschroeder

    Minds gone blank - dealing with if record empty then... Else...

    Is the current form (me) the same as NewContact_Frm? If so, why are you referencing telnumb_txtbx in two different ways? I suppose it doesn't hurt anything -- it's just confusing. If they're in two different forms, why are you looking for "" in one and null in the other? Either way, you...
  14. nschroeder

    Define the combo box

    Whatever redesigning you do is up to you. However, I've attached a db that will accomplish what I think you requested. In order to get around the errors I described earlier, I pretty much started from scratch with the forms, so they're named a little differently, and I didn't include all the...
  15. nschroeder

    Define the combo box

    Rather than remain muddled by the run-time error, I started over and created three new forms to test the code, and I think it will do what you want. I put the code in the double-click event of JobName on form Y, but you could put it elsewhere, such as in a button click. Private Sub...
  16. nschroeder

    Rookie Mistake?

    When an Undo is applied to a specific control, it will only be effective in the BeforeUpdate event of that control. After that (once focus has left the control), the original value in the control can only be restored with an Undo on the form, which would undo ALL control values on the form. If...
  17. nschroeder

    Define the combo box

    Could someone please open his sample database and create and trigger an event on the form to see if you get the same error I got above? It seems specific to his forms. I created a new blank form with a button and a click event, and it ran fine. I also copied his tables and forms to a different...
  18. nschroeder

    Define the combo box

    DeeKay, what you're doing concatenates values from two fields into one. I think he's wanting values from the same field in different records. Radek225, if the "JobName" field in your forms is same as the "MyName" field referred to in your original post, then it's not a combo box, it's a text...
  19. nschroeder

    Font will not change on Memo field

    Here's some improved code that would handle the mixed fonts, etc. Private Sub Memotest_AfterUpdate() Dim sVal As String, i1 As Integer, i2 As Integer With Memotest If Left(.Value, 6) = "<div><" And Right(.Value, 6) = "</div>" Then i2 = 7 ' Starting point Do...
  20. nschroeder

    Define the combo box

    Still not making much sense to me. They way you've described it, the table behind the second subform would have 3 fields: Description (leaflet about cars) Paper size (700 x 500) Print method (single side) Print num (5) And then you show three records as examples, but in the second example, you...
Back
Top Bottom