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 Chris Miller 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. 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...
  16. greely

    Access Equivalent to Excel's Roundup

    I don't believe access provides a RoundUp function like Excel. I developed a function some time ago which is similar in functionality, I call it RoundItUp: ============== Function roundItUp(num As Double, dig As Integer) Dim nmb, dg, mult if dig<=0 then msgbox "The decimal places to be...
  17. greely

    Form - Filter

    Looking at it again, you may not have intended mba to be a variable but the actual string, in which case: Private Sub Form_Load() Me.Filter = "StudieRichting='" & "mba" & "'" Me.FilterOn = True End Sub You might want to search this site or others for a tutorial on string handling...
  18. greely

    Form - Filter

    You have to declare your mba variable Try: Private Sub Form_Load() dim mba Me.Filter = "StudieRichting='" & mba & "'" Me.FilterOn = True End Sub
  19. greely

    Copy Button on a form

    Hi The DLookup function will do just that. For example: If you have a table named ATable with two fields: TheFieldYouWant field and TheFilterField field and a query named qry1 qry1="SELECT ATable.TheFieldYouWant, ATable.TheFilterField FROM ATable;" On a form you have a textbox named text1...
  20. greely

    Confirming selection from a listbox

    One way to do what you want is with an "ok" or "cancel" MessageBox: You can put this code on the existing order button...but towards the top of the procedure before the data is saved to the table. When the order button is clicked, a messagebox will display the items selected from the...

Part and Inventory Search

Back
Top