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

    I should be ashamed of myself. There's no better proof I'm a real amateur. Sorry.
  4. 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...
  5. J

    How to determine the label caption

    The problem is I don't know the label name because this depends on what label the user clicked on. Therfor my question is how to determine the label name.
  6. 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?
  7. 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...
  8. 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...
  9. J

    Passing a date variable to anaother form

    Sorry, but I made a mistake. Adding 3 commars to the DoCmd line does work. Thread can be closed.
  10. J

    Passing a date variable to anaother form

    Passing a date variable to another form Mido and Oldsoftboss, thanks for reply. Mido's suggestions works fine, but what if form2 is not only opened from form1 but also from multiple other forms? I don't' understand Oldsoftboss' filter issue. Adding just 3 commars to the DoCmd line doesn't work.
  11. 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...
  12. 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