Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 15th, 2005, 04:38 PM
bph bph is offline
Friend of Wrox
 
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Still blows up. Same error as above. I put the [ ] around the table1 subform because that's the way they named it when built.

Sql = "Insert into bph_tbl (Text) select " _
    & strquote _
    & Me.[table1 subform].Form.ComputerName _
    & strquote _
    & " as expr1;"

I appreciate your help. Seems like a plausible solution. Don't know.
Bph

 
Old March 15th, 2005, 04:42 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Brian,
It doesn't understand the brackets.
Using the Me. command should pop up a list of things in the main form.
browse down until you get to table1 subform, and double click it. Then put .form.computername the line should look exactly like this:

& me.table1_subform.form.computername _


Kevin

dartcoach
 
Old March 15th, 2005, 04:51 PM
bph bph is offline
Friend of Wrox
 
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Kevin,

When I leave the brackets off I get 'method or datamember not found'.

It doesn't show in the list that drops after ME. .

Brian

 
Old March 15th, 2005, 04:55 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try this.

& Forms![Primary].[Table1 Subform].Form.Computername _

Is the actual subform full name Table1 Subform ?

Kevin

dartcoach
 
Old March 15th, 2005, 04:57 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Brian,

Go to your subform inside the main form. Click to get to the properties and verify that the name is: Table1 subform. Also, make sure the textbox1 field name on the form is computername.

Kevin

dartcoach
 
Old March 15th, 2005, 05:02 PM
bph bph is offline
Friend of Wrox
 
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Yes that the name. But wait, progress has been made.

I'm getting an Syntax error on insert into statement.

when i hold the cursor of sql it has a value of

"insert into bph_tbl (Text) select "bhastings" as expr1;"

 
Old March 15th, 2005, 05:05 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Brian,

In your table bph_tbl, what is the actual field name you're putting "bhastings" into?

Kevin

dartcoach
 
Old March 15th, 2005, 05:08 PM
bph bph is offline
Friend of Wrox
 
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
Default

computer_name

 
Old March 15th, 2005, 05:16 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Brian,

Replace (Text) with (Computer_Name)

Kevin

dartcoach
 
Old March 15th, 2005, 05:19 PM
bph bph is offline
Friend of Wrox
 
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Kevin,

Excellent!!! It works. Thanks so much. I've got the rest from here.

Brian






Similar Threads
Thread Thread Starter Forum Replies Last Post
Grabbing a section of a sound file BrianWren Pro VB 6 0 January 3rd, 2008 04:21 PM
Grabbing form variables jroxit Classic ASP Basics 5 June 18th, 2007 05:08 PM
Grabbing user login info Quick209 ASP.NET 2.0 Basics 1 May 12th, 2006 07:06 PM
Grabbing data from a WebTable Ahrenl Excel VBA 1 May 24th, 2005 12:34 PM
Grabbing URL aingalsbe PHP How-To 1 April 5th, 2004 05:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.