Recent content by Mark Rock

  1. Mark Rock

    Closing a form without a 'save prompt'

    In case someone else is looking for the same, I am posting that I finally found the solution to the issue I was having as described above. Attach the final code snippet at the end of your module. It never complains of mysterious open forms again! : DIM myfrm as Form DIM cnt_controls as...
  2. Mark Rock

    Closing a form without a 'save prompt'

    Couple of interesting observations from the latest deep-dive into OnClose events. OnClose does NOT get called when you issue DoCmd.Close acForm, myfrm.Name, acSaveNo Instead it gets called whenever you actually get the Yes / No save prompt -- which may not occur until you exit the database. =)...
  3. Mark Rock

    Closing a form without a 'save prompt'

    Thank you for the reply Bob. Since posting I had added that line. it still doesn't work. Crazy huh? How does it know the form name if the originating control is set to Nothing?? So far best tries have been, DoCmd.Close acForm, myfrm.Name, acSaveNo Set myfrm = Nothing and DoCmd.Close...
  4. Mark Rock

    Closing a form without a 'save prompt'

    Um. Oops. It appears to work, but doesn't really. The form is still known to the database and when you go to close the database it remembers the form you created and asks you whether to save it. Still not acceptable. Is there a way to remove it from the database at that point? Any hints...
  5. Mark Rock

    Closing a form without a 'save prompt'

    Woohoo! I am on a roll and seem to have solved my own issues today. For anyone else wanting a simple way to do this try: DoCmd.RunCommand acSaveNo It closes the form and does not prompt to save it!!
  6. Mark Rock

    Closing a form without a 'save prompt'

    I know this forum has a ton of posts related to closing a forum, but I have not had one workout for my purposes. I have used CreateForm to open a new form from a template form. When I am done with it, I want it to go away and to do so quietly. I have tried both DoCmd.Close acForm...
  7. Mark Rock

    Concatenating List box to a Text Pox

    Sorry about the typos. Let's pretend I didn't actually suggest a single quote instead of Chr(34)s, o'kay? I was really shooting for something like """" instead of chr(34), but decided to change at last minute.
  8. Mark Rock

    Concatenating List box to a Text Pox

    Your original code: Suggested modification: Private Sub Command18_Click() Dim txtValue As String Dim varItem As Variant Dim strlnameselect As String 'Cycle through selected rows in listbox For Each varItem In Me.Queueselect.ItemsSelected Select Case Len(txtValue) Case 0 txtValue = " &...
  9. Mark Rock

    Globals defined in a Function Module blank on MouseDown Event (from Form)

    Where? Did you miss this or does this not do what I think? Set mycntl = GetCmdButtonVar() Or do I need to do it elsewhere, as well? Or are you saying something is wrong with this? Set mycmdbutton = CreateControl(myfrm.Name, acCommandButton, acHeader, "", "", 7250, 1250, 2000, 500) I expect...
  10. Mark Rock

    Readonly Security on db objects to everyone except 3 usernames

    I saw a post on this somewhere. It suggested you read / utilize the environment information to pull out the user's name I assume you then check the current user's name against a table of users allowed to edit. Edited to include link: Thread discussing getting a username from the environment
  11. Mark Rock

    Creating Checkboxes on subform via VBA Module programming

    Thanks for all the help guys. I admit though that nothing I tried that day works so I eventually gave up on trying to use a subform and just split the controls across the header section and the details section as I mostly just wanted to be able to vertically scroll the checkboxes without also...
  12. Mark Rock

    Globals defined in a Function Module blank on MouseDown Event (from Form)

    I have read and re-read so many posts on using globals. Apparently, I am more lost then I thought-- they refuse to work for my application as coded. Access VBA Module: mod_global_defs, Option Compare Database Option Explicit Public myfrm As New Form Public mycmdbutton As Control Access VBA...
  13. Mark Rock

    Creating Checkboxes on subform via VBA Module programming

    I thought that too after debating on whether to use the square brackets ([])or not. I ended up trying it both as shown above and by replacing the Object.Name nomenclature with a string variable -- Didn't help. I also put in a msgbox() function and found out the actual names being assigned...
  14. Mark Rock

    Creating Checkboxes on subform via VBA Module programming

    Thank you for the help Bob! I am attempting to understand what you are telling me. The result is that I tried modifying the code as follows, Dim myfrm As New Form Dim mysubfrm As Control Dim myctlbox As Control Dim mychkbox(500) As Control Dim num As Integer num = 1 Set myfrm = CreateForm...
Back
Top Bottom