A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Controls Disappear



 
 
Thread Tools Display Modes
  #1  
Old May 29th, 2007, 09:41 PM posted to microsoft.public.access.forms
JimS
external usenet poster
 
Posts: 252
Default Controls Disappear

When I fired the btnClear button (with the following code...), All my
controls disappeared (though the code works...) and I can't get them back.
They're there in design mode, but won't appear in form mode. Yes, I did check
the visible property. It's OK. I was shocked! Any ideas?

Private Sub btnClear_Click()
Dim response As Variant
response = MsgBox("I told you not to click this!", vbOKCancel, "Killin
All Batches!!!")
If response = vbOK Then
Dim strSQL As String
strSQL = "UPDATE tblStaffAugTrans SET tblStaffAugTrans.Batchid =
null WHERE ISNULL(tblStaffAugTrans.Batchid) = False"
DoCmd.RunSQL strSQL
CurrentProject.AccessConnection.Execute "DELETE * from tblbatch"
Me.Requery
End If
End Sub
--
Jim
  #2  
Old May 29th, 2007, 10:18 PM posted to microsoft.public.access.forms
missinglinq via AccessMonster.com
external usenet poster
 
Posts: 545
Default Controls Disappear

Controls "disappear" when the form's RecordSource has no records in it and
the AllowAdditions is set to NO. When you delete all the records with your
code, your RecordSource is, essentially, empty!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200705/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.