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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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...
  15. mndrlion

    Need help constructing a form

    In the Current event on the subform you can do something like this textbox1 = field1 If textbox1 is on the main form then try this Parent![textbox1] = field1
  16. mndrlion

    Need help constructing a form

    There needs to be a space between CommentXREFQuestionnaire and the VALUES keyword. Add a space after CommentXREFQuestionnaire and before the closing quote. strSQL = "INSERT INTO CommentXREFQuestionnaire " & _ "VALUES(""28"", ""E"", ""2"");"
  17. mndrlion

    Building an expression

    ConvertedDateTime = DateAdd("s", SecondsSinceJan_1_1970, #1/1/1970#)
  18. mndrlion

    conver currency to text

    The problem is in this line near the top of the function: cents = Right(dblValue, 2) Replace it with cents = (dblValue - Fix(dblValue)) * 100 The Right() function converts dblValue to string first then takes the right most two characters. The value of 100.10 is converted to a string...
  19. mndrlion

    Bound field to display different value

    Set up your list box as follows Row Source Type: Value List Row Source: 0;none;1;complete;2;incomplete Bound Column: 1 Column Count: 2 Column Widths: 0";1" This will cause the number value to be saved in your table but the text values will be displayed in the list box.

Part and Inventory Search

Back
Top