Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 29th, 2004, 01:09 PM
netguy netguy is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 netguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Open subform for editing

Help! MY brain has hit a black hole.
I have set the Allow Edits property of my main form to NO, created a command button to allow edits and change the back color and cmd button text. What code do I have to add and where do I add it to open up the subform for editing??
Also can I change the back color of all the controls on both forms from white to gray on form open with code? If so what would be an example of the code. Thanks for your help!
Below is the code that I have written for the command button.

Dim ctl As Control
Dim lngBackColor As Long
Me.AllowEdits = Not (Me.AllowEdits)
If Me.AllowEdits = True Then
Me!cmdEditRecord.Caption = "Lock"
lngBackColor = vbCyan
Else
Me!cmdEditRecord.Caption = "Edit Record"
lngBackColor = vbWhite
End If
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Or TypeOf ctl Is ComboBox Then
ctl.BackColor = lngBackColor
End If
End Sub

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Open subform for editing


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT