Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by mndrlion

  1. mndrlion

    MouseUp on a ListBox

    That's what I did. I am not able to reproduce your problem. I tested in Access 2002.
  2. mndrlion

    MouseUp on a ListBox

    I am not able to reproduce your problem. I did the following test on the mouse up event of list box 2 with no problems: Private Sub lstBox2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) MsgBox lstBox1 & " " & cbx1 & " " & cbx2 End Sub
  3. mndrlion

    error trap runtime error 6: Overflow

    The overflow error usually indicates that an integer variable has exceeded 32,767. The following code for the OnClick event of a button will cause this error. You can set a breakpoint on the Resume line. When the error occurs you can examine the value of your variables to determine which...
  4. mndrlion

    printing row from listbox where column not null

    You can use the Column property to examine the contents of a column in a listbox. Like this ListBoxName.Column(Index, Row) Index is the zero based column number Row is the optional zero based row number ListBoxName.Column(1, 4) will return the value from the second column...
  5. mndrlion

    Operation Not Allowed

    Add the following line in the Form_Unload event Cancel = True to prevent the form from closing
  6. mndrlion

    Trouble adding to new line

    My understanding is that you want to add a new record to tblFieldNotes. Use an Append query instead of an Update query.
  7. mndrlion

    Programatically duplicating a field in a table

    I think that this is what you are asking for: Dim db As DAO.Database Dim tdf As DAO.TableDef Dim fld As DAO.Field Dim strSQL As String Set db = CurrentDb Set tdf = db("myTable") Set fld = tdf.CreateField("AmountEnd", dbDouble)...
  8. mndrlion

    DSum Question

    strWhereClause2 does not need to be inside the parens. Try it this way: =DSum("[AmountReq]","Qry_Main",strWhereClause2 & " [Approp] = 'F&E'")
  9. mndrlion

    Updating a text box

    In order to reference the text property of a control, the control must have focus. This should work: If cboMath1PF = "N" Then txtMathSkills = "No Active Record" . . .
  10. mndrlion

    Incrimenting Numbers

    You can call the function from a query, from the control source of a form, from another module, etc. From a query SELECT CompanyName, NextInvoiceNumber(CompanyName) as NewInvoiceNum FROM myTable
  11. mndrlion

    Conditional formating in Access 97 report

    Add the following code to the On Format event of the detail section of your report. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If YesNoField Then txtCustomer.FontBold = True Else txtCustomer.FontBold = False End If End Sub
  12. mndrlion

    Single quote in query string causing problems

    If you use single quotes as the text delimiter, use the following: Dim strSQL As String Dim strComment As String strComment = Replace(txtComment, "'", "''") strSQL = "Update tblComments Set Comment = '" & strComment & "' WHERE key = 'a';" CurrentDb.Execute...
  13. mndrlion

    Incrimenting Numbers

    Place this code in a module. Note correction in DMAX parameters. Function NextInvoiceNumber(NewlyAddedCompanyName as string) as integer dim varLastInvoiceNum as variant dim InvoiceNumber as integer varLastInvoiceNumber = DMAX("InvoiceNumberField", "TableName", "CompanyNameField...
  14. mndrlion

    Incrimenting Numbers

    I think that you really want to increment the last invoice number that was used for a company. dim varLastInvoiceNum as variant varLastInvoiceNumber = DMAX("CompanyNameField", "TableName", "CompanyNameField = '" & NewlyAddedCompanyName & "'") if isnull(varLastInvoiceNum) then...

Part and Inventory Search

Back
Top