Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dameeti

    How do you know if a report will be empty?

    Thanks. This sounds like exactly what I needed. Thanks!! :-)
  2. dameeti

    How do you know if a report will be empty?

    I need to know how to get the record count from a query. I know this is probably simple, but I'm at a loss right now. I have a query that is the source for a report, but I want to know (before the report runs) if there are no records so I can not even bring up the report on the screen (in...
  3. dameeti

    Changing record within subform from main form

    GOOD news. After reviewing the code, I had a typo... so the first suggested fix DID fix it. Now the code works. So I had to first set the focus on the FORM, and then set the focus on the FIELD. That was the fix. Thanks for both of you. Case solved! Yea!!
  4. dameeti

    Changing record within subform from main form

    Yes, you're right. It's NOT the field name, it a variable that contains what I'm seeking, not where I'm seeking. I know it's right 'cuz my debug messages confirm what I'm loking for. Silly me... sorry for the confusion. So any ideas?
  5. dameeti

    Changing record within subform from main form

    Well, that avoided the eror on the FindRecord, but it didn't move to the desired record within the subform. Progress :-) ... but not success. :-( Any other ideas?
  6. dameeti

    Changing record within subform from main form

    I tried to get this figured out a few months ago but it never worked. I am specifying the record set within the main form, and after the correct recordset is brought in for the subform, I want to then change the current record within the subform, not just stay at the first record found in the...
  7. dameeti

    How to invoke a procedure within a subform

    Okay, the latest chapter in this soap opera. I tried the following code: Forms!frmCustomerEntry!theform.SetFocus I received the error 2465 ("MS Access can't find the field 'theform' referred to in your expression."). :-( In case I needed the .Form property, I then tried...
  8. dameeti

    How to invoke a procedure within a subform

    Now this is getting strange. I just read that Screen.ActiveForm will refer to the main form, even if the subform has the actual focus. So I guess the correct reference would be (I'm hoping) Screen.ActiveControl.Parent, and to get the name of the active form (even if it's a subform), it would...
  9. dameeti

    How to invoke a procedure within a subform

    Per your last post... PrevFormName = Screen.PrevControl.Parent.Name Then my previous post... PrevControl = Screen.PreviousControl PrevForm = Screen.PreviousControl.Parent ChgForm = PrevForm.Name <> "subFormName" Between the lines in my post, I think I already got your suggestion already in...
  10. dameeti

    How to invoke a procedure within a subform

    I'm guessing that I can merely do something like: PrevControl = Screen.PreviousControl PrevForm = Screen.PrevControl.Parent ' Does above reference the current form or parent of? ChgForm = PrevForm.Name <> "subFormName" If ChgForm Then Me!subFormName.SetFocus Me.TextFieldName.SetFocus...
  11. dameeti

    How to invoke a procedure within a subform

    As to your follow-up response: That explains a few areas that were a bit cloudy before as they apply to VBA usage. Okay, I understand your flicker point completely. Let me just clarify my usage. The code in question only executes once when the user changes customers by specifying an item...
  12. dameeti

    How to invoke a procedure within a subform

    A follow question: If I set the focus upon the field within the subform, does that implicitly set the focus upon the form? Or must I first set the focus on the form and then set the focus upon the field itself? I thought I had set the focus upon the field, or is the problem that since it...
  13. dameeti

    How to invoke a procedure within a subform

    Actually, the only reason I was trying to set the focus on one of the fields was solely to find the desired record within the subform. The mere fact that you felt that it wasn't the reason I was doing it does catch my attention. Is there another way I could achieve the same results (changing...
  14. dameeti

    How to invoke a procedure within a subform

    Okay, asusming that fixes the problem (I won't know until I get back to work on Monday), why is this even needed? The implciation being that the current active control isn't the form in which the routine is executing. I never even considered that. Since the previous lines (e.g., the MsgBox...
  15. dameeti

    how to take last character out of string if character is a space...

    If we're trying to do tighter code :-), why not just do: str = str.replace(/\s$/,""); Yeah, it is one character shorter. LOL. Though I kinda prefer if (str.charAt(str.length-1)=" ") str=str.slice(0,-2); ... since it would seem to execute faster -- only a simple test on the last position...
  16. dameeti

    Javascript Replace Command Error

    You don't need to modify all the places you use the referrer. Just put some code at the top of the entry routine. In that code, grab the referrer and put it into a named variable -- with that error-trapping code on. Inside the error-trapping code (which would only execute when you get the...
  17. dameeti

    How to invoke a procedure within a subform

    Okay, the most recent update on this problem. I'm able to successfully call the routine within the subform. Under some circumstances, the .SetFocus does appear to work -- well, I don't get an error, and I know this because the following line (a MsgBox does execute and I get the expected...
  18. dameeti

    Automatically Scroll to Bottom of List Box

    Maybe I'm missing something, but don't those two "Microsoft" references conflict with each other -- one says 'read/write' and the other says 'read only' -- or is something missing from my comprehension? The other thing I noticed was that the first MS reference says that the index returns '0'...
  19. dameeti

    How to invoke a procedure within a subform

    My first reaction would be to say maybe you're right.... But the SetFocus is called within the called routine and no error occurs -- I know this because the next line is a MsgBox and it executes (i.e., I get the msg in the screen). It's not until the NEXT line (the FindRecord) that the On...
  20. dameeti

    How to invoke a procedure within a subform

    In the main form: Call [Listings].Form.FindABItem(itemNumber) In the sub-form: Public Sub FindABItem(ABItem As Integer) On Error GoTo Err_FindABItem . . . MsgBox "Starting at item #" & Me.Item_Number & " and searching for #" & ABItem Me.Item_Number.SetFocus MsgBox "Focus has been...

Part and Inventory Search

Back
Top