Search results

  1. E

    Close command window

    It’s still not doing what I want. I remarked out the On Error just to see what was happening -- not permanently removing it. I placed some test messages in the “Insert Code” area (see below). As long as the laptop is connected it works fine. My problem is when the laptops not there the...
  2. E

    Close command window

    I’m still having a problem running the code if the laptop is not connected (works great when connected). It hangs for about 70 seconds then “Run-time error – The specified network name is no longer available” END - DEBUG - HELP Here’s where I’d rather have a message appear MsgBox “Laptop...
  3. E

    Close command window

    I'm not quite there yet but I think you sent me in the right direction. I'll look at it a bit more tomorrow and let you know what happens. Thank you for your suggestion. SKK
  4. E

    Close command window

    Hello, Is there a VBA command/code to close a command window? I have a line that maps a network drive then performs some functions and disconnects the mapped drive (I tried coding via UNC path but that bombs). Shell "net use V: \\ce_laptop2\sidewalks /y" A temporary command window opens and...
  5. E

    Open second form to select record

    Paul, I had some additional assistance. Here's what we came up with: Dim intCountRecs As Integer intCountRecs = DCount("*", "qryPermits", "[Request_No]= " & Me.Request_No) If intCountRecs < 1 Then MsgBox "No Permit available..." Exit Sub Else...
  6. E

    Open second form to select record

    Not quite. I'm still seeing the same error. It's bombing on my form's Unload event. Private Sub Form_Unload(Cancel As Integer) DoCmd.SetWarnings False If Me.Grades = -1 Then If Me.Request_No > 0 Then GoTo GoodBye Else DoCmd.RepaintObject DoCmd.RunSQL "INSERT INTO...
  7. E

    Open second form to select record

    Probably just send a message sayng "Permit not available". I was thinking more about this. I was going to try: If "[Request_No] =" & Forms!frmGrades!Request_No Then DoCmd.OpenForm "frmPermits", acNormal, , "[Request_No] =" & Forms!frmGrades!Request_No else msgBox "" end if or something...
  8. E

    Open second form to select record

    Hello, One more thing… When I click a button on the frmGrades, I want to open frmPermits based on the data in the field Request_No. Request_No is a numeric field. If I code: DoCmd.OpenForm "frmPermits", acNormal, , "[Request_No] =" & Forms!frmGrades!Request_No In most instances it works fine...
  9. E

    Open second form to select record

    Supurb - that did it. I will keep this for future reference. Thank you very much once again, SKK
  10. E

    Open second form to select record

    Ultimatley it will be placed in the OnUnload event but as a test I placed the code on a command button
  11. E

    Open second form to select record

    Permit_No is a test field (XX-XXX). But that may be the problem. Is the DoCmd syntax different for text than numeric? I may be able to revise my tables a bit and create a numeric field to query on. SKK
  12. E

    Open second form to select record

    Hello, I’m having a problem open a second form based on data in the first form. I want to open frmGrades when frmPermits closes to the record containing the same Permit_No. To open frmGrades accordingly I coded: DoCmd.OpenForm "frmGrades", , , "[Permit_No] =" & Forms!frmPermits!Permit_No I...
  13. E

    Run Code OnClose

    Thank you. I'll will adjust. SKK
  14. E

    Run Code OnClose

    I've been playing with this a bit but still no luck. I wrote some basic test code with messages to tell me what record I'm on. First I assigned the code to a test command button's OnClick. It worked fine. I then assigned the code to the form's OnClose and it always grabbed the data for...
  15. E

    Run Code OnClose

    I'll try that. Thanks, SKK
  16. E

    Run Code OnClose

    Hello, I’m having a problem when attempting to run code upon closing a form. I have an IF statement on the OnClose property of a form. However, it’s always running the quesry against record #1. I want it to use data from the current record. CODE: If Me.Request_No > 0 And Me.Grades = -1 Then...
  17. E

    OnGotFocus property

    I think that did it. I'm seeing a few other issues now but I think I can get through this. Very much appreciated... Thanks again, SKK
  18. E

    OnGotFocus property

    Hello, I have a question on the form property OnGotFocus. I have a Form-A with at command button that opens Form-B (the Form-A remains open). When data entry is complete on Form-B and it is closed, I want Form-A to update based on what was input on Form-B. I have it working if I code...
  19. E

    Check if form is opened for edit or add

    Thank you, SKK
  20. E

    Check if form is opened for edit or add

    I think I answered my question If Me.NewRecord = True Then Thanks again, SKK
Back
Top Bottom