RickSanchez
New member
- Local time
- Yesterday, 20:08
- Joined
- May 22, 2025
- Messages
- 6
I have a main form where, on the main form's On Open event, it changes the properties of a subform query by hiding/showing a column, depending on the user's permission level:
	
	
	
		
The problem is that when the user closes the form, it asks them if they want to save the changes that were made above:
		
		
	
	
		 
	
I need it to either not ask to save or to just automatically save it, without bothering the user with this. What can I do here? I've already tried
	
		
, but this didn't work because not only did it still ask me to save the changes to the subform query but also the main form.
 
		Code:
	
	
	Private Sub Form_Open(Cancel As Integer)
    If IsUserInGroup("CostPrice") = True Then
        [subDefaultBOM].Form.Controls("Standard Cost").Properties("ColumnHidden") = False
    Else
        [subDefaultBOM].Form.Controls("Standard Cost").Properties("ColumnHidden") = True
    End If
End SubThe problem is that when the user closes the form, it asks them if they want to save the changes that were made above:
I need it to either not ask to save or to just automatically save it, without bothering the user with this. What can I do here? I've already tried
		Code:
	
	
	DoCmd.Save acForm, Me.Name
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		 
 
		 
 
		 
 
		
 
 
		