[mso] Re: Access Form Help

  • From: "Doug Gay" <sneakersdg@xxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Mon, 11 Jan 2010 10:03:56 -0600

Herbert: You may want to check out "Access 2007 VBA Programmers Reference" 
by Henning, Cooper, Griffith and Stein, ISBN: 978-0-470-04703-3. I find it 
excelent for VBA questions.

Tx, Doug
----- Original Message ----- 
From: "Herbert Chitate" <hchitate@xxxxxxxxxxx>
To: "MSO Group" <mso@xxxxxxxxxxxxx>
Sent: Sunday, January 10, 2010 2:55 PM
Subject: [mso] Re: Access Form Help


> Thanks Doug,
>
>
>
>
>
> This works perfectly!!!
>
>
>
> Many thanks, much appreciated.
>
>
>
> Herbert
>
>> From: sneakersdg@xxxxxxxxxxx
>> To: mso@xxxxxxxxxxxxx
>> Subject: [mso] Re: Access Form Help
>> Date: Sun, 10 Jan 2010 14:36:24 -0600
>>
>> Herbert: I did not recall how to test if a form is open; however, since 
>> if
>> refer to a closed form will get an error you can use the following:
>>
>> Private Sub Form_Activate()
>>
>> On Error GoTo Err_Form_Activate
>> 'copy content of txtA from FormA to txtB of this form
>> Me.txtB = Forms![frmA]![txtA]
>> 'If [frmA] is not open will raise an error and goto Err_Form_Activate 
>> which
>> simply goes to exit
>> '[frmB] will be open in either case
>> Exit_Form_Activate:
>> Exit Sub
>>
>> Err_Form_Activate:
>> Resume Exit_Form_Activate
>>
>> End Sub
>>
>>
>> ----- Original Message ----- 
>> From: "Herbert Chitate" <hchitate@xxxxxxxxxxx>
>> To: "MSO Group" <mso@xxxxxxxxxxxxx>
>> Sent: Sunday, January 10, 2010 1:18 PM
>> Subject: [mso] Re: Access Form Help
>>
>>
>> > Thanks Doug,
>> >
>> >
>> >
>> > Not sure what I hade done, but I redid the form and and it works fine
>> > now...Another question though....Could you help with the code to attach 
>> > to
>> > this one so that FormA is not open, it skips the whole "Me.txtB =
>> > Forms![FormA]![txtA]" and simply opens the second form without any
>> > autopopulation.
>> >
>> >
>> >
>> > something like if FormA is not open, exit sub,
>> >
>> >
>> >
>> > otherwise Me.txtB=.......etc.
>> >
>> >
>> >
>> >
>> >
>> > Many Thanks
>> >
>> >
>> >
>> > Herbert
>> >
>> >
>> >> From: sneakersdg@xxxxxxxxxxx
>> >> To: mso@xxxxxxxxxxxxx
>> >> Subject: [mso] Re: Access Form Help
>> >> Date: Sun, 10 Jan 2010 12:42:34 -0600
>> >>
>> >> Herbert: I built the two forms as described and it worked fine. I'm
>> >> currently using Access 2007. Is your text box named [txtA] or [textA]? 
>> >> Is
>> >> it
>> >> a simple matter of using the wrong name in the code?
>> >>
>> >> Good Luck,
>> >> Doug
>> >> ----- Original Message ----- 
>> >> From: "Herbert Chitate" <hchitate@xxxxxxxxxxx>
>> >> To: "MSO Group" <mso@xxxxxxxxxxxxx>
>> >> Sent: Sunday, January 10, 2010 11:03 AM
>> >> Subject: [mso] Re: Access Form Help
>> >>
>> >>
>> >> > Hi Doug,
>> >> >
>> >> >
>> >> >
>> >> > Thanx for the advice, I have done this, but I get an error message
>> >> > which
>> >> > says "Method or Data member not found" and the [txtA] is highlighted 
>> >> > in
>> >> > blue, but [textA] does exist.
>> >> >
>> >> >
>> >> >
>> >> > I have read the following on microsoft's support site, and not sure 
>> >> > if
>> >> > this relates to my problem, and if so what on earth does it
>> >> > mean...."Class
>> >> > modules are private in scope to the Visual Basic project in the
>> >> > database
>> >> > in which they are defined. Therefore, procedures in class modules
>> >> > cannot
>> >> > be referenced in another Visual Basic project."
>> >> >
>> >> >
>> >> >
>> >> > Many Thanks
>> >> >
>> >> >
>> >> >
>> >> > herbert
>> >> >
>> >> >> From: sneakersdg@xxxxxxxxxxx
>> >> >> To: mso@xxxxxxxxxxxxx
>> >> >> Subject: [mso] Re: Access Form Help
>> >> >> Date: Mon, 4 Jan 2010 16:37:48 -0600
>> >> >>
>> >> >> Hi Herbert
>> >> >>
>> >> >> Say you have FormA with text box, txtA and FormB with text box, 
>> >> >> txtB.
>> >> >>
>> >> >> Create a Command Button with the Button Wizard, select form 
>> >> >> operations
>> >> >> and
>> >> >> Open Form. Of course select FormB to open. The following code will 
>> >> >> be
>> >> >> generated.
>> >> >>
>> >> >>
>> >> >>
>> >> >> Private Sub CmdA_Click()
>> >> >>
>> >> >> On Error GoTo Err_CmdA_Click
>> >> >>
>> >> >> Dim stDocName As String
>> >> >>
>> >> >> Dim stLinkCriteria As String
>> >> >>
>> >> >> stDocName = "FormB"
>> >> >>
>> >> >> DoCmd.OpenForm stDocName, , , stLinkCriteria
>> >> >>
>> >> >> Exit_CmdA_Click:
>> >> >>
>> >> >> Exit Sub
>> >> >>
>> >> >> Err_CmdA_Click:
>> >> >>
>> >> >> MsgBox Err.Description
>> >> >>
>> >> >> Resume Exit_CmdA_Click
>> >> >>
>> >> >>
>> >> >> End Sub
>> >> >>
>> >> >>
>> >> >>
>> >> >> Now open FormB for design and create the following for the Activate
>> >> >> Event:
>> >> >>
>> >> >> Private Sub Form_Activate()
>> >> >>
>> >> >> 'copy content of txtA from FormA to txtB of this form
>> >> >>
>> >> >> Me.txtB = Forms![FormA]![txtA]
>> >> >>
>> >> >> End Sub
>> >> >>
>> >> >> This is the general idea...
>> >> >>
>> >> >> Thanks and Luck,
>> >> >>
>> >> >> Doug
>> >> >>
>> >> >> ----- Original Message ----- 
>> >> >> From: "Herbert Chitate" <hchitate@xxxxxxxxxxx>
>> >> >> To: "MSO Group" <mso@xxxxxxxxxxxxx>
>> >> >> Sent: Monday, January 04, 2010 1:27 PM
>> >> >> Subject: [mso] Access Form Help
>> >> >>
>> >> >>
>> >> >> >
>> >> >> > Hi Folks,
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > I was wondering if someone could help me with a form issue in
>> >> >> > access. I
>> >> >> > have a form that does the usual i.e. edit, delet add new record 
>> >> >> > etc.
>> >> >> > I
>> >> >> > would like to place a button on this form which opens up another
>> >> >> > form
>> >> >> > (populating a differet table). I would like for some of the 
>> >> >> > fields
>> >> >> > on
>> >> >> > this
>> >> >> > newly opened form to be automatically populated from the contents 
>> >> >> > of
>> >> >> > the
>> >> >> > firrst form.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > Could anyone help me with the code that I can attach to an event
>> >> >> > procedure?
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > The above way of opening the form is only one of the methods to 
>> >> >> > open
>> >> >> > the
>> >> >> > second form. I would also like a user to be able to open the form
>> >> >> > directly
>> >> >> > (i.e. not from an initial form) and manually type in in the
>> >> >> > information.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > Could you also advise the best place to put the event procedure 
>> >> >> > so
>> >> >> > that
>> >> >> > the above two methods of opening the form do not conflict.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > Many Thanks
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > Herbert
>> >> >> >
>> >> >> >
>> >> >> > _________________________________________________________________
>> >> >> > View your other email accounts from your Hotmail inbox. Add them
>> >> >> > now.
>> >> >> > http://clk.atdmt.com/UKM/go/186394592/direct/01/
>> >> >> > *************************************************************
>> >> >> > You are receiving this mail because you subscribed to
>> >> >> > mso@xxxxxxxxxxxxx
>> >> >> > or
>> >> >> > MicrosoftOffice@xxxxxxxxxxxxxxxx
>> >> >> >
>> >> >> > To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>> >> >> >
>> >> >> > To Unsubscribe from this group, visit the group's homepage and 
>> >> >> > use
>> >> >> > the
>> >> >> > dropdown menu at the top. This will allow you to unsubscribe your
>> >> >> > email
>> >> >> > address or change your email settings to digest or vacation (no
>> >> >> > mail).
>> >> >> > //www.freelists.org/webpage/mso
>> >> >> >
>> >> >> > To be able to share files with the group, you must join our Yahoo
>> >> >> > sister
>> >> >> > group. This group will not allow for posting of emails, but will
>> >> >> > allow
>> >> >> > you to join and share problem files, templates, etc.:
>> >> >> > http://tech.groups.yahoo.com/group/MicrosoftOffice . This group 
>> >> >> > is
>> >> >> > for
>> >> >> > FILE SHARING ONLY.
>> >> >> >
>> >> >> > If you are using Outlook and you see a lot of unnecessary code in
>> >> >> > your
>> >> >> > email messages, read these instructions that explain why and how 
>> >> >> > to
>> >> >> > fix
>> >> >> > it:
>> >> >> > http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> >> >> > *************************************************************
>> >> >> >
>> >> >>
>> >> >> *************************************************************
>> >> >> You are receiving this mail because you subscribed to
>> >> >> mso@xxxxxxxxxxxxx
>> >> >> or MicrosoftOffice@xxxxxxxxxxxxxxxx
>> >> >>
>> >> >> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>> >> >>
>> >> >> To Unsubscribe from this group, visit the group's homepage and use 
>> >> >> the
>> >> >> dropdown menu at the top. This will allow you to unsubscribe your
>> >> >> email
>> >> >> address or change your email settings to digest or vacation (no 
>> >> >> mail).
>> >> >> //www.freelists.org/webpage/mso
>> >> >>
>> >> >> To be able to share files with the group, you must join our Yahoo
>> >> >> sister
>> >> >> group. This group will not allow for posting of emails, but will 
>> >> >> allow
>> >> >> you to join and share problem files, templates, etc.:
>> >> >> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is 
>> >> >> for
>> >> >> FILE SHARING ONLY.
>> >> >>
>> >> >> If you are using Outlook and you see a lot of unnecessary code in 
>> >> >> your
>> >> >> email messages, read these instructions that explain why and how to
>> >> >> fix
>> >> >> it:
>> >> >> http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> >> >> *************************************************************
>> >> >
>> >> > _________________________________________________________________
>> >> > Do you have a story that started on Hotmail? Tell us now
>> >> > http://clk.atdmt.com/UKM/go/195013117/direct/01/
>> >> > *************************************************************
>> >> > You are receiving this mail because you subscribed to 
>> >> > mso@xxxxxxxxxxxxx
>> >> > or
>> >> > MicrosoftOffice@xxxxxxxxxxxxxxxx
>> >> >
>> >> > To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>> >> >
>> >> > To Unsubscribe from this group, visit the group's homepage and use 
>> >> > the
>> >> > dropdown menu at the top. This will allow you to unsubscribe your 
>> >> > email
>> >> > address or change your email settings to digest or vacation (no 
>> >> > mail).
>> >> > //www.freelists.org/webpage/mso
>> >> >
>> >> > To be able to share files with the group, you must join our Yahoo
>> >> > sister
>> >> > group. This group will not allow for posting of emails, but will 
>> >> > allow
>> >> > you to join and share problem files, templates, etc.:
>> >> > http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is 
>> >> > for
>> >> > FILE SHARING ONLY.
>> >> >
>> >> > If you are using Outlook and you see a lot of unnecessary code in 
>> >> > your
>> >> > email messages, read these instructions that explain why and how to 
>> >> > fix
>> >> > it:
>> >> > http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> >> > *************************************************************
>> >> >
>> >>
>> >> *************************************************************
>> >> You are receiving this mail because you subscribed to 
>> >> mso@xxxxxxxxxxxxx
>> >> or MicrosoftOffice@xxxxxxxxxxxxxxxx
>> >>
>> >> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>> >>
>> >> To Unsubscribe from this group, visit the group's homepage and use the
>> >> dropdown menu at the top. This will allow you to unsubscribe your 
>> >> email
>> >> address or change your email settings to digest or vacation (no mail).
>> >> //www.freelists.org/webpage/mso
>> >>
>> >> To be able to share files with the group, you must join our Yahoo 
>> >> sister
>> >> group. This group will not allow for posting of emails, but will allow
>> >> you to join and share problem files, templates, etc.:
>> >> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for
>> >> FILE SHARING ONLY.
>> >>
>> >> If you are using Outlook and you see a lot of unnecessary code in your
>> >> email messages, read these instructions that explain why and how to 
>> >> fix
>> >> it:
>> >> http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> >> *************************************************************
>> >
>> > _________________________________________________________________
>> > Got a cool Hotmail story? Tell us now
>> > http://clk.atdmt.com/UKM/go/195013117/direct/01/
>> > *************************************************************
>> > You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx 
>> > or
>> > MicrosoftOffice@xxxxxxxxxxxxxxxx
>> >
>> > To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>> >
>> > To Unsubscribe from this group, visit the group's homepage and use the
>> > dropdown menu at the top. This will allow you to unsubscribe your email
>> > address or change your email settings to digest or vacation (no mail).
>> > //www.freelists.org/webpage/mso
>> >
>> > To be able to share files with the group, you must join our Yahoo 
>> > sister
>> > group. This group will not allow for posting of emails, but will allow
>> > you to join and share problem files, templates, etc.:
>> > http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for
>> > FILE SHARING ONLY.
>> >
>> > If you are using Outlook and you see a lot of unnecessary code in your
>> > email messages, read these instructions that explain why and how to fix
>> > it:
>> > http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> > *************************************************************
>> >
>>
>> *************************************************************
>> You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx 
>> or MicrosoftOffice@xxxxxxxxxxxxxxxx
>>
>> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>>
>> To Unsubscribe from this group, visit the group's homepage and use the 
>> dropdown menu at the top. This will allow you to unsubscribe your email 
>> address or change your email settings to digest or vacation (no mail).
>> //www.freelists.org/webpage/mso
>>
>> To be able to share files with the group, you must join our Yahoo sister 
>> group. This group will not allow for posting of emails, but will allow 
>> you to join and share problem files, templates, etc.: 
>> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for 
>> FILE SHARING ONLY.
>>
>> If you are using Outlook and you see a lot of unnecessary code in your 
>> email messages, read these instructions that explain why and how to fix 
>> it:
>> http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> *************************************************************
>
> _________________________________________________________________
> Tell us your greatest, weirdest and funniest Hotmail stories
> http://clk.atdmt.com/UKM/go/195013117/direct/01/
> *************************************************************
> You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
> MicrosoftOffice@xxxxxxxxxxxxxxxx
>
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>
> To Unsubscribe from this group, visit the group's homepage and use the 
> dropdown menu at the top.  This will allow you to unsubscribe your email 
> address or change your email settings to digest or vacation (no mail).
> //www.freelists.org/webpage/mso
>
> To be able to share files with the group, you must join our Yahoo sister 
> group.  This group will not allow for posting of emails, but will allow 
> you to join and share problem files, templates, etc.: 
> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for 
> FILE SHARING ONLY.
>
> If you are using Outlook and you see a lot of unnecessary code in your 
> email messages, read these instructions that explain why and how to fix 
> it:
> http://personal-computer-tutor.com/abc3/v28/greg28.htm
> *************************************************************
> 

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: