Search results

  1. D

    While a form is open......

    Here is a function that will check if a form is open and loaded. If so, the function will return true. Function fIsLoaded(ByVal strFormName As String) As Integer 'Returns a 0 if form is not open or a -1 if Open If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then If...
  2. D

    text cursor

    add the following to your Add Record button after you create the new record... me!Field_Name.setfocus This should place the focus on your wanted field. Hope this helps. Doug
  3. D

    Print from a form

    You should just be able to go to the Page Setup of the report and change it there... Everytime you print after that, it should always be in landscape. Hope this helps.. Doug
  4. D

    Using "Before Update" to check for Nulls/Message Box Question

    The quickest way would probably be to set the tag property of each of your required fields to some common value, say Required. Then loop through each control in the form in the before update event of the form and if the tag matches, cancel the update... Here's an example... dim ctl as control...
  5. D

    Unwriteable Combo Box

    Set the Limit to List property to Yes in the Data tab of the properties sheet. This will only allow users to select items in the list.
  6. D

    multiple choices from multiple combo box

    Capri, There are two solutions here... First if you wanted to use your approach, you need three combo boxes bound to three different fields. I would assume you have all three combo boxes assigned to the same field in your underlying table/query. Create three fields, Employee1, Employee2...
  7. D

    While a form is open......

    Your easiest way to do this is to hide Form1 in the OnOpen event of Form2. Then unhide Form1 in the OnClose event of Form2. Hope this helps. Doug
  8. D

    Combo-box linking?

    You can set that up pretty easily... Build your form with a recordsource of "MatchPlayers". Then position the fields on your form(You mentioned you want it to resemble the field.) and then change them to combo boxes. Then all you have to do is set each combo boxes control Source to your...
  9. D

    how to apply filter to a filter?

    You just have the sytax incorrect... Use the ampersand(&) to concatenate the new filter... Me.Filter = Me.Filter & " And PromotionType =" & cboPromotionType Also, if PromotionType is a string value, then you have to put tick marks(') around the variable, like so... Me.Filter = Me.Filter & "...
  10. D

    User defined type - not defined

    Well, check your references. First make sure no references are "MISSING". If so, then uncheck the box. Then check to make sure you have the DAO 3.x or 4.x library checked. Access the references sheet by openeing a module, then going to tools-->References... Hope this helps you... Doug
  11. D

    counting rows

    Use the following in your variable... strSQLCount = "Select Count(*) As NumRecs from TC_TestCase" Then just use NumRecs as your fieldname and that will give you the number... Just a suggestion... Just open the table, then check for EOF or use the recordcount property. Either of these should...
  12. D

    how to apply filter to a filter?

    You can use the following in the AfterUpdate event of the combo box... me.filter = me.filter & " AND " 'Enter your new filter criteria here.... Hope this helps.. Doug
  13. D

    Undo a record

    Look on the Microsoft Download Site... Download the Form Sample Database. On that database, it shows how to correctly undo a record, along with all the subform records.... Hope this helps. Doug
  14. D

    when the value is = *****X

    You could use the right() function. dim strLetter as string strLetter = Right([PacketNumber],1) The value of the letter will then be stored in strLetter. Hope this helps. Doug
  15. D

    Time Periods

    Well you could use the datediff and dateadd functions... function NumJanuary(Date1 as date, Date2 as date) as integer dim NumYears as integer dim ctr as integer dim JanuaryCount as integer JanuaryCount = 0 NumYears = datediff("yyyy",Date1, Date2) for ctr = 1 to NumYears if...
  16. D

    Setting a value

    You can run an update query after validation... dim MyDB as database dim MySQL as string MySQL = "UPDATE [UserTable] SET lastOn=#" & date() & "#, Password='" & NewPassword & "', PasswordDate=#" & date() & "# Where UserName='" & UserEnteredName & "'" Set MyDB = currentdb MyDB.Execute MySQL...
  17. D

    Creating an ImageMap

    Use the OnMouseDown event. This fires when a button is pressed and gives you the X,Y coordinates.. I would probably throw the range of coordinates for each action in table and then OnMouseDown, compare the X,Y to the table.. Just a thought.. Doug
  18. D

    PrintOut Action

    What you could do is create a customized toolbar and put the macro on a button there... To create the toolbar, just right click on the toolbar up top and choose customize.. Then hit new and name the toolbar and all. Then put a custom button on the toolbar and right-click it while in design...
  19. D

    INSERT INTO Help needed please

    Dim test2 as string dim MySQL as string test2 = 4 MySQL = "INSERT INTO company_categories (company_name_id,category_name_id) SELECT '" & test2 & "','" & 3 & "'" DoCmd.RunSQL MySQL,-1 You have to concatenate the variable into the string.. I also seperated your criteria string from the...
  20. D

    Can i create an input mask for a input box

    No you can't.. You're best bet is to simulate an input box with a form... You can open the form and can wait for the form to close, and then proceed with your code... Unfortunately, this is the only way to get that effect on user input. Doug
Back
Top Bottom