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  

Farm as a subform



 
 
Thread Tools Display Modes
  #1  
Old December 28th, 2006, 11:47 PM posted to microsoft.public.access.forms
Owen
external usenet poster
 
Posts: 80
Default Farm as a subform

Hello,

I have a form I use to enter contact information (Contactsfrm). I am using
this same form, as a subform, on a second form (Projectsfrm). I'd like to be
able to not allow edits on the subform, but need to allow input on the stand
alone form. Is this possible or do I need to create a separate new form to
use as the subform?

TIA

Owen
  #2  
Old December 29th, 2006, 01:43 AM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default Farm as a subform

Hi Owen,

you may use the same form and just change the property through code.
For instance, from the Load event of the (sub)form:

'~~~~~~~~~~~~~~~~~
Dim mStr As String
On Error Resume Next
mStr = Me.Parent.Name
If Err.Number 0 Then
MsgBox "no parent"
me.AllowEdits = true
Else
MsgBox "has parent"
me.AllowEdits = false
End If
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Owen wrote:
Hello,

I have a form I use to enter contact information (Contactsfrm). I am using
this same form, as a subform, on a second form (Projectsfrm). I'd like to be
able to not allow edits on the subform, but need to allow input on the stand
alone form. Is this possible or do I need to create a separate new form to
use as the subform?

TIA

Owen

  #3  
Old December 29th, 2006, 05:52 PM posted to microsoft.public.access.forms
Owen
external usenet poster
 
Posts: 80
Default Farm as a subform

Crystal,

Thank you very much. That was a big help.

Owen

"strive4peace" wrote:

Hi Owen,

you may use the same form and just change the property through code.
For instance, from the Load event of the (sub)form:

'~~~~~~~~~~~~~~~~~
Dim mStr As String
On Error Resume Next
mStr = Me.Parent.Name
If Err.Number 0 Then
MsgBox "no parent"
me.AllowEdits = true
Else
MsgBox "has parent"
me.AllowEdits = false
End If
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Owen wrote:
Hello,

I have a form I use to enter contact information (Contactsfrm). I am using
this same form, as a subform, on a second form (Projectsfrm). I'd like to be
able to not allow edits on the subform, but need to allow input on the stand
alone form. Is this possible or do I need to create a separate new form to
use as the subform?

TIA

Owen


  #4  
Old December 29th, 2006, 06:49 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default Farm as a subform

you're welcome, Owen happy to help

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Owen wrote:
Crystal,

Thank you very much. That was a big help.

Owen

"strive4peace" wrote:

Hi Owen,

you may use the same form and just change the property through code.
For instance, from the Load event of the (sub)form:

'~~~~~~~~~~~~~~~~~
Dim mStr As String
On Error Resume Next
mStr = Me.Parent.Name
If Err.Number 0 Then
MsgBox "no parent"
me.AllowEdits = true
Else
MsgBox "has parent"
me.AllowEdits = false
End If
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Owen wrote:
Hello,

I have a form I use to enter contact information (Contactsfrm). I am using
this same form, as a subform, on a second form (Projectsfrm). I'd like to be
able to not allow edits on the subform, but need to allow input on the stand
alone form. Is this possible or do I need to create a separate new form to
use as the subform?

TIA

Owen

 




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 10:40 PM.


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