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 John Tel 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 greely

  1. greely

    what is wrong with this VB/SQL

    If you still experience an error with Remou's recommendation, try: if internaljobid is datatype numeric in your table: CellsAdded = "SELECT COUNT(celltable.[internaljobid]) As CountOfInternaljobid FROM celltable, campaigntable WHERE ((celltable.[internaljobid]) =" &...
  2. greely

    what is wrong with this VB/SQL

    All the posts so far are on the money, but there are some typos and other problems. 1. Declare CellsAdded as a string. Dim CellsAdded as String 2. Declare db as Database Dim db as Database 3. then set db Set db = currentdb() 4. Set the recordset like this (CellsAdded is a variable and should...
  3. greely

    DB Closes Automatically after 20min

    Not the same. Its probable that the code causing the shutdown uses one of the date/time functions. I take it that your response to my previous post indicates that you have searched these without finding any suspect code. Good Luck Ron Isn't it great when it works the first time?
  4. greely

    DB Closes Automatically after 20min

    any references in code to the timer function? Ron Isn't it great when it works the first time?
  5. greely

    DB Closes Automatically after 20min

    There are utilities which will monitor for specific processes and shut them down after a specific length of time. There does not need to be a reference to this utility in the access application. If its one of these, it probably monitors msaccess.exe activity and shuts down the instance of...
  6. greely

    Option group selection

    Hi PB90 I will usually use the onMouseUp event. Ron -Isn't it great when it works the first time?
  7. greely

    Loop through a list and match to combo box on form

    To reference a specific column in a combobox you use: Me!YourComboBoxName.Column(0) Where the 0 is the first column, 1 is the second col, etc. The best way to programmatically 'Click' a command button is to not click it at all. What you do is set up a procedure like this...
  8. greely

    Syntax for invisible control

    To give credit where credit is due: formerTexan had given a direction to OpenArgs in his previous post. Glad to help Ron -isn't it great when it works the first time?
  9. greely

    Syntax for invisible control

    As I understand it, you would like combo30 on GATracking to be visible when called from one form, but not visible when called from another. if so, you can do this using OpenArgs as follows: On the form calling GATracking where combo30 is to be invisible, change the coCmd.openForm from...
  10. greely

    If/Then Not working

    When a table is designed in Access, and a field data type is set to a number, Access automatically inserts the default to 0. Be careful here, because another form, calculated field, or ? within the project may expect the default number of 0. Changing this could break another area of your...
  11. greely

    If/Then Not working

    Try this: open the **table** in design view. Ensure that the default value for the field is not set to 0 Hope this helps
  12. greely

    Confirming selection from a listbox

    Hi Steve, Looks as if you have done most of it correctly The following code generates the list of items from theStainsList. What it's doing is looping through each selected item in the list (ctl.itemsselected) and then adding them together with a line feed (vbcrlf) between each item: =======...
  13. greely

    Between clause = form textboxes?

    In access, dates are delimited with hashes (#) in your sql, try: BETWEEN #" & [Forms]![myForm]![FromYear] & "# AND #" & [Forms]![myForm]![ToYear] & "#" You may also have to ensure the dates are properly formatted and/or use cdate([Forms]![myForm]![FromYear]) Hope this helps
  14. greely

    Automatically calculating "Lag Days" on Access Table

    Ginger is right. Daily updating of all records in a table is not reasonable because it opens your data to all kinds of risks. A power outage while the query is running....etc But then management is not always reasonable, or so my employees say. But if you can, heed Ginger's advice. After...
  15. greely

    Automatically calculating "Lag Days" on Access Table

    Two methods: 1. As you said, create a query with all the table fields plus a calculated field lagdays: DateDiff("d",[datecreated],Date()). Then have management look at the query. 2. If they *must* look only at the table, and not a query, then create an Access Update Query (on the query wizard...

Part and Inventory Search

Back
Top