Search results

  1. M

    Case statement

    This is a great thread. I was looking to do just this and I have been working on it on and off all day. Got me right to my answer. Thanks both!!!
  2. M

    Set Subform Controls Visible Based on Combo

    On a subform I have a combo (cboType) Based on the selection of that combo, I have certain controls on the form that should be visible and the rest false. I created a Case Select statement on the after update of that combo, to set the subform controls visible and invisible. A couple of...
  3. M

    Move Parent form record from subform control

    I am not understaning why you have a main form with a subform and both have same control source. Can you explain reasoning behind this, please? It may help to better understand your setup.
  4. M

    Custom Search Form to Search All Records?

    I found a search form online (I think on one of these FAQs) that you can click a command button on an entry form and open up. You have the fields available for search on the top, and you can enter criteria for one or more of those. Then there is a bottom half, which is a 2nd form that shows up...
  5. M

    Convert Seconds into HH:MM:SS

    Hey, I was searching for this syntax and just thought I would post a thank you.
  6. M

    Update a field

    not that this is an issue any more, but you can also do a find a replace from the table. Just find null and replace all with your value. If replacing a field that is a look up, just make sure to replace the id not the text... hth
  7. M

    Reports from Form strwhere Date - subreport?

    I have a reports form. On this form, the user chooses the report that they want, by the first option group. Then they choose a date option on the second option group. They can choose today, to enter a date, a date range, or all dates. Then the "get report" command button opens the report, and...
  8. M

    Case Select - Report OnOpen - Date Range ?

    Thanks. I found that the problem with my code was the following: Msg = "my message text Style = vbOKOnly Title = "my message date" Msgbox Msg, , Title I was missing the statement to display the message. lol Thank you for your help.
  9. M

    If a textbox value = null then

    oddly enough, it wasn't even the empty string. It was in the message: Msg = "You must enter a date in the Choose Date field!" Style = vbOKOnly Title = "Date Must be Entered!" I forgot to put the Msgbox msg,,Title That did it. Thanks for all the help!
  10. M

    If a textbox value = null then

    I hope that I am not opening a can of worms, but I have code with text boxes that MAY require a date, and I can't seem to get them to work. Can someone please help? Here is the form that I have for users to choose a report: Here is the code that is behind the onclick of the command button...
  11. M

    Case Select - Report OnOpen - Date Range ?

    ok here is the entire onclick code. BTW the optiongroup does = 2 when I hover over it... Private Sub cmdOpenReport_Click() On Error GoTo ErrorHandler Dim Msg, Style, Title Dim gstrReportName As String Dim gstrWhere As String Select Case Forms![frmReports]![GrpReportType] Case 1...
  12. M

    Case Select - Report OnOpen - Date Range ?

    It says " Me.txtFromChoose.Value = Null " when I hover over it. (I put Stop on the line above it, and then tested it. Is that right?) I also notice that if I hover over the gstrWhere a little bit down... DoCmd.OpenReport gstrReportName, acViewPreview, , gstrWhere It says - gstrWhere =...
  13. M

    Case Select - Report OnOpen - Date Range ?

    but that's what I have.... lol. The part I am having problems with is the Me.txtFromChoose.Value < 0 I have also tried Len(Trim$(Me.txtFromChoose & vbNullString)) = 0 and isnull (Me.txtFromChoose.Value ) and isnull(Me.txtFromChoose) and isnull(Me.txtFromChoose.text) and...
  14. M

    Case Select - Report OnOpen - Date Range ?

    well..... I spoke too soon. The main of that code is working, but the last part is having a problem. this part: If GrpReportDate = 2 And Me.txtFromChoose.Value < 0 Then Msg = "You must enter a date in the Choose Date field!" Style = vbOKOnly Title = "Date Must be Entered!" ElseIf...
  15. M

    Case Select - Report OnOpen - Date Range ?

    WOW YOU RULE!!!!! It worked! Thank you sooooo much!!!!! Now I don't have to do that stupid onopen code for every report! This makes sooooo much sense! Oh, and you were right. The strwhere did need to be declared as a string. Here is the final code, in hopes that it can help others...
  16. M

    Case Select - Report OnOpen - Date Range ?

    Hey, I started to try it out, and I got some errors. Here is what I got from the today code (just by typing it) - Here is what I got from the date range: I am not sure how to set this right. I have set these variables as strings and I get that invalid use of null error. This is what...
  17. M

    Case Select - Report OnOpen - Date Range ?

    Excellent. I am going to try this out. Thank you for all of the explanations. It makes a lot more sense now. I do have a question about the code: For the variables that you declared - strwhere and strreport. Does strwhere need to be declared as a date or integer? I was getting an invalid...
  18. M

    Case Select - Report OnOpen - Date Range ?

    Well, not the response I was expecting, so I am a little taken aback. Thank you for responding. Sounds promising... I dont understand what this means. Can you explain a bit more? What underlying SQL. I am sorry, but while I do my best to construct codes in my apps, I do not really...
  19. M

    Locked main form - validate 1 subform with another?

    I have discussed this with a few people on different forums and I think it may work best that if someone chooses the activity for received updated address, the focus will move them to the address subform on an new record for today's date. I talked with the main user and she is ok with this...
  20. M

    Case Select - Report OnOpen - Date Range ?

    Hi, I am having some trouble. I am using a select case with option groups on a form. The first option group (grpReportType) on the form passes a variable to the button on the form (cmdOpenReport - onclick), to choose what report to open. In the report open code , I am trying this Case Select...
Back
Top Bottom