 |
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
|
|
|

March 15th, 2005, 04:38 PM
|
Friend of Wrox
|
|
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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
|

March 15th, 2005, 04:42 PM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|

March 15th, 2005, 04:51 PM
|
Friend of Wrox
|
|
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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
|

March 15th, 2005, 04:55 PM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Try this.
& Forms![Primary].[Table1 Subform].Form.Computername _
Is the actual subform full name Table1 Subform ?
Kevin
dartcoach
|

March 15th, 2005, 04:57 PM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|

March 15th, 2005, 05:02 PM
|
Friend of Wrox
|
|
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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;"
|

March 15th, 2005, 05:05 PM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Brian,
In your table bph_tbl, what is the actual field name you're putting "bhastings" into?
Kevin
dartcoach
|

March 15th, 2005, 05:08 PM
|
Friend of Wrox
|
|
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
computer_name
|

March 15th, 2005, 05:16 PM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Brian,
Replace (Text) with (Computer_Name)
Kevin
dartcoach
|

March 15th, 2005, 05:19 PM
|
Friend of Wrox
|
|
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Kevin,
Excellent!!! It works. Thanks so much. I've got the rest from here.
Brian
|
|
 |