Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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
  #1 (permalink)  
Old August 28th, 2007, 07:30 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Auto Populating Fields in Form

I am trying to auto populate fields in a form once I type in a unique text in my first field. I have an unbound form with a datasheet view subform for entering new invoices. I have a separate table that has cost IDs with their associated description, cost months, expense type, etc. When I enter a new invoice in the subform, I want to enter its cost ID and have the form auto populate the remaining information like cost month, expense type, description, etc and save it in that linked table. Below are the exact tables and forms I have. Any help is much appreciated. Thanks.

Cost ID Table: FINMDW-CTC Assignments
New Invoice Table: FINMDW-Workspace
Main Form: FINMDW-main
Subform linked to New Inv Table: FINMDW_S_main
  #2 (permalink)  
Old August 28th, 2007, 10:36 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure I understand what you want to do. You want to start populating a child table, and THEN have the parent table populated?

Why wouldn't you create a form, subform, and have the user select the parent record, and then just start adding invoives?

Or do you want to take data from the parent table and duplicate it in the child table (invoices?) That can be done, but not a good practice.

I am still not sure what you are doing. Can you post a use-case? Forms are not as important as tables and their relationships.

mmcdonal
  #3 (permalink)  
Old August 29th, 2007, 04:28 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

I am not quite sure of your table set up however perhaps the following may help

Typically if you have a table holding Client; and Client Orders

Client holding name address phone et al
Client orders holding Units UnitCost Total Cost and so one

The client and client orders table being in a one to many relationship (Client Being the One)

Then the information required for say invoicing can be a combination of client name and adress and requisite detail from client orders such as quantity unit and total cost. This combination of information would take the form of a query

Such query would be used to create a report the output from the report being your invoice

You could almost do all of this by using the wizards (Though not entirely it would need to be tweeked such that only the invoices you required at a given point in time were actually printed

Hope this has been of help

Man Friday







  #4 (permalink)  
Old August 29th, 2007, 04:43 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Re last post

Having re-read I notice I typed table and not table(s)

Client and Client Orders should of course be separate tables

Apologies

Man Friday





Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating Fields from a textbox teddyk ASP.NET 2.0 Basics 1 August 8th, 2008 06:25 AM
populating online text fields etc hamilton C# 2 June 20th, 2007 09:16 AM
Auto Populate fields in a form mnemec24 Access 8 March 9th, 2005 02:11 PM
Populating a form maneor Access 1 September 30th, 2004 03:41 PM
Populating Fields on a Form with Cookie Name-Value WebDevel Javascript How-To 1 December 5th, 2003 05:15 PM





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