473,612 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populate fields in a table using fields from another table

MattFitzgerald
30 New Member
My Forms & Tables:-
Main form is Frm_LE_List (contains Customer Details) Stored in Tbl_LE_List
Which contains subform Frm_VOL_Referen ces (Contains Orders known as VOL's) Stored in Tbl_VOL_Referen ces
This subform has subform Frm_Order_Lines (Contains line items for orders) Stored in Tbl_Order_Lines
I also have a table Tbl_Rate_Card_L ookup (This contains information used to populate Tbl_Order_lines

Relationships:-
Tbl_LE_List is related to Tbl_VOL_Referen ces by field [LE ID] (one to many)
Tbl_VOL_Referen ces is related to Tbl_Order_Lines by field [VOL Ref] (one to many)
Currently ther is no relationship between Tbl_Order_Lines and Tbl_Rate_Card_L ookup (Here in lies my question)

Question:-
Tbl_Rate_Card_L ookup is a table provided to me by an external source as an when changes are made to it.
The Tbl_Rate_Card_L ookup has the product information to populate most of my fields in my subform Frm_Order_Lines .
Both Tbl_Rate_Card_L ookup and Frm_Order_Lines have the following fields in common:-
Expand|Select|Wrap|Line Numbers
  1. Product Description,Text,PK (No Duplicates)(Products may be added removed each month)
  2. Product Group 1,Text (Could change)
  3. Product Group 2,Text (Could change)
  4. Sch 5 Target Area,Text (Could change)
  5. LB Commission Unit,Number,Currency (Could change)
  6. LB Commission Percent,Number,Percentage (Could change)
  7. Cobra Statement Area,Text (Could change)
  8. LB Payplan Area,Text (Could change)
  9. % payable to agent,Number,Percentage (Could change)
As you can see above the Product description should always stay constant though new product may be added and old ones removed.
But month on month the other fields relating to the product may change so no point linking Tbl_Order_Lines to Tbl_Rate_Card_L ookup as so many possible changes.
What I would like to do is when an order is placed have an "Add New Order Line" button in my form Frm_VOL_Referen ces which allows me to select a product from Tbl_Rate_Card_L ookup and the fields from the product selected used to populate the new record in Frm_Order_Lines

Half the battle is knowing what you want to do, I need help with the other half as I have no idea how to do it. Please be kind and gentle with any explinations. I am going to try and attach a zip file with my design so far as it may help fill in any gaps in my explanations.
Attached Files
File Type: zip 2008_2009 V2.zip (66.0 KB, 108 views)
Feb 20 '08 #1
3 2724
MattFitzgerald
30 New Member
I have almost resolved this now

I created a form based on the rate table and when I click add record this opens.

I then added a combo box and using the combo box wizard selected the option allowing your selection in the combo box to select the record set.

I added a button to this table saying proceed which opens a further form which is based on the table Tbl_Order_Lines and the default properties look at the field based on my selection on the previous table. I then only need to fill in the field not populated.

Then I click on a button Save and Close

Which saves the line item then closes the form.

All I need now is the code to attach to the Save and Close Button which will refresh my sub form Frm_Order_Lines

Any help is much appreciated.

Best Regards Matt Fitzgerald
Feb 21 '08 #2
MattFitzgerald
30 New Member
Am adding updated zip so can see where upto so far any other suggested improvements are welcome as I may not be structuring things in most efficient way and any advise is much appreciated. Especially advice on best ways to refresh forms after making additions e.g adding new LE then being able to select it.
Attached Files
File Type: zip 2008_2009 V2.zip (77.0 KB, 107 views)
Feb 22 '08 #3
MattFitzgerald
30 New Member
I think part of my problem is I do not fully understand the difference between

.Recalc
.Refresh
.Requery

as I think in some of the problems I have been having is if I use .recalc on a subform it seems to update the main form details as well and I should have used refresh.

can anyone explain the differences between these 3?
And any pitfuls to watch out for as I think in my learning I am falling into all of them!

Best Regards

Matt Fitzgerald
Feb 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3101
by: bill.brennum | last post by:
Hi, This is probably a question with a simple answer, but here goes. I have a form linked to a table. There is a field on that table that while not showing on the form, I would like to populate via a lookup using either a popup or subform. This is an employee name match application that will allow a user to lookup a corporate employee and assign them to an unmatched person.
1
3673
by: John Phelan-Cummings | last post by:
I'm not certain if this made the post. Sorry if it's a repeat: Using a Button to take an autonumber from one form to populate another autonumber field on another form. I have a Mainform "A" with a button and code that opens another Mainform "B" with a subform which has the same table as Mainform "A". The button is supposed to tell the subform with the autonumber field
16
10511
by: agrawal.solutions | last post by:
Hello Friends I am asking a very silly question but i dont find any solution fo this.. I am selectiong a recordset and want to populate a combobox where id would be inviseble and the content would. I am getting the recordset and the no of record but then i am unble to populate the combobox. I have already tried all the function starting form for each x in .... and while...wend and do....loop
6
3614
by: Jchick | last post by:
Im a newbie with a sql table in a MSDE database that contains fields of CustName, BrokerName, Type, Status. I am trying to write a trigger that does this: 1. When a new record in a table is added, I would like the selected fields to be copied to another table (call it Master). 2. If that Master table already contains a record where the CustName = CustName, then simply ignore. If CustName does not match anything, then add the record to...
1
3388
by: dmeyr | last post by:
Hello, I am new to Access and am having difficulty with a Dlookup function. I have a form that I wish to autopopulate 10 fields with values based on two criteria which are also fields on the form. The user would enter the two criteria in the form and the ten fields autopopulate. To achieve this, I used a Dlookup function in the Control Source of the fields I wished to autopopulate. These Dlookups work perfectly except that my table does...
5
17673
by: joshua.nicholes | last post by:
I have an access database that consists of two tables.A data collection table and a species list table. The data collection table has about 1500 records in it and the species list has about 600. The species list has 7 fields the first is a four digit unique identifier (species) it is set as the primary key. I have created a relationship to the data collection table which also has a species field (4 digit id). In my form I have the species...
1
1749
by: KMEscherich | last post by:
Using Access '97 Hi there, am wondering if someone can please help me with the following: I have a master table (T_INVESTIGATION) that contains the following fields as well as other fields. T_INVESTIGATION LOC_CODE, STR_ADDR, CITY,
4
13950
by: whamo | last post by:
I have the need to populate a field based on the selection in a combo box. Starting out simple. (2) tables tbl_OSE_Info and tbl_Input; tbl_OSE_Info has three fields: Key, OSE_Name and OSE_Wt tbl_Input has three fields: OSE_Job, OSE_Name, OSE_Wt I have populated tbl_OSE_Info table. I need to create a form that will store the data in tbl_Input I have racked my brain so much trying to figure out how to auto populate a field based on a...
0
1565
by: mkidd | last post by:
Hi, I'm trying to build an online form using asp.net and vb.net for the code behind in Visual Studio 2005. I want to fill 3 fields in a FormView that's connected to one table (table1) with information from another table (table2) by choosing the key field from table2 in a DropDownList. Table2 has 3 fields with info that doesn't change (name, phone# and
0
8114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8568
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5536
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4047
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4110
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2554
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1699
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.