473,379 Members | 1,201 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Populate fields in a table using fields from another table

MattFitzgerald
My Forms & Tables:-
Main form is Frm_LE_List (contains Customer Details) Stored in Tbl_LE_List
Which contains subform Frm_VOL_References (Contains Orders known as VOL's) Stored in Tbl_VOL_References
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_Lookup (This contains information used to populate Tbl_Order_lines

Relationships:-
Tbl_LE_List is related to Tbl_VOL_References by field [LE ID] (one to many)
Tbl_VOL_References 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_Lookup (Here in lies my question)

Question:-
Tbl_Rate_Card_Lookup is a table provided to me by an external source as an when changes are made to it.
The Tbl_Rate_Card_Lookup has the product information to populate most of my fields in my subform Frm_Order_Lines.
Both Tbl_Rate_Card_Lookup 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_Lookup 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_References which allows me to select a product from Tbl_Rate_Card_Lookup 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, 107 views)
Feb 20 '08 #1
3 2704
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
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, 106 views)
Feb 22 '08 #3
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
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...
1
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"...
16
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...
6
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...
1
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....
5
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....
1
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. ...
4
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.