Wrox Programmer Forums
|
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 February 12th, 2005, 12:26 PM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table field update

Hello,
I have two tables, one is Customer and one Estimate.
I open a form that I see the customers and need to update or add new estimate.
My P KEY is MainContactNumber.
When I launch the AddEstimate Form from specific Customer Form details, all the data I entered is updated into the Estimate table but the MainContactNumber.
How can I get this field to update since it is the one that relates between the two tables???

Thanks
IB
 
Old February 12th, 2005, 03:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It looks like you haven't got the forms linked; eg as form and subform?

An alternative. On AddEstimate form put a textbox, hidden if you like. Make it's default value equal to the MainContactNumber using syntax like =Forms!frmMainForm!MainContactNumber. Bind this textbox to the MainContactNumber field of your Estimate table.

Hope this helps,



Clive Astley
 
Old February 12th, 2005, 03:46 PM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That is a great idea!!!
BTW, how you make a sub form?

Thanks
IB
 
Old February 12th, 2005, 03:59 PM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And what should be the control source of this hidden textbox?

Thanks
IB
 
Old February 12th, 2005, 08:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello IB,

Best way to make a subform is to use the subform wizard.

Bind the textbox to the MainContactNumber field of your Estimate table. The default value will then go to this field automatically.

Clive Astley





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update one table to another table using DTS in SQL Printmaker SQL Language 0 July 24th, 2007 07:17 AM
update table with an ID Num from different table scoobie PHP How-To 12 January 25th, 2005 12:28 PM
Update parent table with the sum of child table gbrown SQL Language 2 November 9th, 2004 07:53 AM
Update city field based on zip field nganb SQL Server ASP 0 April 22nd, 2004 10:30 PM
auto update table field nkrukovsky Access VBA 2 November 4th, 2003 05:28 PM





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