Search results

  1. M

    Check if a form is opened/close all forms

    You would have to type the form names in vb, which i agree is a pain and would have to modified if a new forms was added but i don't know of any other way of finding out what objects are loaded. If anyone knows i'd be just as interested as you. Mitch.
  2. M

    Check if a form is opened/close all forms

    Well you could use this function and pass the loop through all the forms in you database closing them if the fuction is true. Function IsLoaded(aformname as string) as interger on error goto IsLoaded_Err dim x as string x = Forms(aformname).name ' produces error 2450 if not loaded IsLoaded =...
  3. M

    Code for text box date event

    It would be better to use the afterupdate property otherwise you'll input date after every key stroke, which will slow your system down. Mitch.
  4. M

    Looping through records

    Ok here goes ' Declare you variables Dim dbs as database Dim rst as recordset Dim Counter as integer ' set up a updateable recordset of your table Set dbs = CurrentDB Set rst = dbs.openrecordset("SELECT * FROM [YourTableName]", dbopendynaset) ' find number of records in your recordset counter...
  5. M

    Visible If..function on text box

    How about you try this if [fld1] = #01/01/00# OR [fld2] = #01/01/00# then [txtLeaveType].Visible = True ElseIf [fld1] < #01/01/00# AND [fld2] > #01/01/00# then [txtLeaveType].Visible = True else [txtLeaveType].Visible = False end if Hope it helps Mitch.
  6. M

    Display information From combo box

    The best way to do it would to have the fields you wish to display as hidden columns in you combo box and set the AfterUpdate procedure to set text boxs to the corresponding column number. [txtPhoneNo] = [cboSelector].Column(1) [txtWorkPlace] = [cboSelector].Column(2) Please note that column...
  7. M

    refresh form from subform

    Just an idea but you could put the forms![frmFormName].Refresh command into the got focus of each item in the subform then whenever tab (ie change field is pressed) the new field gets the focus and the refresh action is carried out. Mitch.
  8. M

    Creating a Search Form

    Ok, with the code your using the link criteria will simple be set to the last if criteria which was met. So you have test all three items in the if statement and have a resulting LINKCRITERIA for each. e.g. If [txtBoxNo] <> "0" AND [txtName] = "0" AND [txtDateIn] = "0" then LINKCRITERIA =...
  9. M

    defult value in a culculation

    oh yeah forgot to add default value should also be set 0, and not £0.00 as this will convert it automatically. Mitch
  10. M

    defult value in a culculation

    Set the text box's format to currency then any value held in the text box will be converted automatically into the correct currency format, such as £1.20 instead of 1.2 & your 0 value will be displayed as £0.00. Hope this helps. Mitch
  11. M

    Code Question

    Comments is class module. You need to copy the code for this module otherwise you cannot use its functions. The code should be included in your book. Hope it works now. Mitch
Back
Top Bottom