Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2006

Tip: Looking for answers? Try searching our database.

getting values from form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lena - 17 Sep 2006 12:14 GMT
Hi,

I perform filter on subform.
After filtering I want to append values from column of subform to another
table.

This code is not working :

DoCmd.RunSQL "INSERT INTO [Tissues for RNAs] ([Tissue ID])
VALUES(Forms![Browse All Tissues]![Tissue ID])"

The problem is to get values from column in subform.

Thanks in advance.
Douglas J. Steele - 17 Sep 2006 12:42 GMT
http://www.mvps.org/access/forms/frm0031.htm at "The Access Web" is a good
overview of how to refer to controls on subforms.

An important thing to realize, though, is that when it refers to "Subform1"
or "Subform2" in that chart, it's referring to the name of the subform
control on the parent form, which may or may not be the same as the name of
the form being used as the subform.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Hi,
>
[quoted text clipped - 10 lines]
>
> Thanks in advance.
lena - 17 Sep 2006 14:11 GMT
I tryed to follow the instructions, but I get run-time error 2764 (the
expression you entered refers to an object that closed or doesn't exist):

"INSERT INTO [Tissues for RNAs] ([Tissue ID]) VALUES(" & Me![Browse All
Tissues].Form![Tissue ID] & ")"

and another option that i tryed is also problematic:

"INSERT INTO [Tissues for RNAs] ([Tissue ID]) VALUES(Forms![Browse All
Tissues].[Tissue ID])"

I checks the name of subforms and forms.
What else can I do?

> http://www.mvps.org/access/forms/frm0031.htm at "The Access Web" is a good
> overview of how to refer to controls on subforms.
[quoted text clipped - 18 lines]
> >
> > Thanks in advance.
Douglas J. Steele - 17 Sep 2006 18:43 GMT
Where are you running the code from: the parent form, or the subform?

If it's from the subform, you should be able to use simply Me![Tissue ID]

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I tryed to follow the instructions, but I get run-time error 2764 (the
> expression you entered refers to an object that closed or doesn't exist):
[quoted text clipped - 36 lines]
>> >
>> > Thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.