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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|