Search results

  1. J

    How to set query parameters for use in OpenRecordset

    I’ve the following query definition “selOrders” PARAMETERS [DateFrom] DateTime, [DateTo] DateTime; SELECT * FROM Orders WHERE OrderDate BETWEEN [DateFrom] AND [DateTo] I want to open this query as a DAO.Recordset but have problems to assign values to the parameters. I tried different...
  2. J

    Date format in query

    I have the following query SELECT * FROM Orders WHERE OrderDate Between #4-9-2006# And #4-10-2006# I expect rows with OrderDate = 5-9-2006 to be returned, however they are not. Apparently the date formats are interpretted as mm-dd-yyyy instead of dd-mm-yyyy. Can I set the default date format...
  3. J

    How to set a command button to Transparant = True

    On form1 I have a command button to open form2. Before opening form2 I open form2 first in design mode to add an extra command button to form2 using the following code: Dim ctl As Control Set ctl = CreateControl(FormName, acCommandButton, , , , 100, 100) I want to set this newly created...
  4. J

    How to determine the label caption

    On a form I have multiple labels. In the Click event of all these labels I would like to call a generic function for futher processing. For this processing however, I need the caption of the label the user clicked on. How do I determine this caption?
  5. J

    Error handling problem

    On a form i have a textbox to enter a date and multiple command buttons to open other forms. After entering a date, either followed by a tab or clicking on one of the command buttons, i want the date validated. In case of an invalid date an error must be displayed and the cursor positioned to...
  6. J

    Error handling problem

    On a form i have a textbox to enter a date and multiple command buttons to open other forms. After entering a date value, followed by either a tab or clicking on one of the command buttons, i want to validate the entered date value. If the date is invalid i want to display an error message and...
  7. J

    Passing a date variable to anaother form

    In form1 I've a command button to open form2. Code in form1: Private Sub button_Click() On Error GoTo Err_button_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "form2" stLinkCriteria = button.Caption DoCmd.OpenForm stDocName, , , stLinkCriteria...
  8. J

    How to change the label caption of a variable label name?

    I have n horizontal labels named Label_1 to Label_n. I'd like to assign values to the label captions by using a loop. Something like: For i = 1 To n Set Label_i.Caption = i End However, this doesn't work. Message "Object required". Any suggestions?
Back
Top Bottom