472,789 Members | 891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Auto update data in form from another form

Can anyone help me get this working.

table1 has 3 field, CustId, CustName, CustRate

table2 has 7 fields TimeId, TimeCustId, TimeCustName, TimeDate,
TimeStartTime, TimeEndTime, TimeCustRate, TimeRemaks

Both forms work great by them selves.

Problem -- When I enter table2 - TimeCustId, I want the 2 fields
TImeCustName and TimeCustRate to be automatically update with the
CustName and CustRate from table1.

Looking for a quick and "CLEAN" way of doing this.

Thanks,

Rodney
Apr 7 '07 #1
1 2965

"Rodney Frisard" <rf******@cox.netwrote in message
news:kl********************************@4ax.com...
Can anyone help me get this working.

table1 has 3 field, CustId, CustName, CustRate

table2 has 7 fields TimeId, TimeCustId, TimeCustName, TimeDate,
TimeStartTime, TimeEndTime, TimeCustRate, TimeRemaks

Both forms work great by them selves.

Problem -- When I enter table2 - TimeCustId, I want the 2 fields
TImeCustName and TimeCustRate to be automatically update with the
CustName and CustRate from table1.

Looking for a quick and "CLEAN" way of doing this.

Thanks,

Rodney
Remove the TimeCustName and the TimeCustRate fields from table2 because this
is not good normalisation practice. You may need to keep the TimeCustRate
field in table2 if you need to keep a history of what that customers rate
was at the time of that transaction if the customer's rate changes over
time.

If you remove those two fields in table2, create a form using table2 as its
source and bind the 6 remaining fields: TimeID, TimeCustID, TimeDate,
TimeStartTime, TimeEndTime, TimeRemarks. On that form add an unbound text
box and call it txtCustRate with the label Customer Rate. Change its enabled
property to false and its locked property to true.

Change the TimeCustID text box to a combo box and name it cboCustID. For the
recordsource for the combo box choose all 3 fields from table1 and sort the
CustName to ascending. For the column count property of the combo box, set
this to 3. In the combo boxes column width property, set this to
0cm;3cm;1.5cm (or 0";1.2";0.6" if using inches) and change the list width
property to 5cm (1.8"). In the recordsource property of the txtCustRate type
"=cboCustID.Column(2)" without the quotes.

Save your form and when ever you select a customer from the combo box list,
you won't see the customer id and the customer's rate will automatically
appear in the rate field.

Jeff
Apr 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jerry Brenner | last post by:
Our users have potentially dirty legacy data that they need to get into our application. We provide a set of staging tables, which map to our source tables, that the users do their ETL into. ...
8
by: Bruce Stockwell | last post by:
the setup: Webservice/WinClient application/SQL server. VS.Net (visual basic) winform wizard creates a simple form with load cancel cancelall and datagrid bound to a simple Dataset with one...
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
5
by: Josselin | last post by:
I have a page 'pni.php' to which paypal is redirecting after payment thsi page contains a db update script, no problem it's running well but once this script is executed (transparently for the...
0
by: saraDotNet | last post by:
Hi, I'v Two Questions: 1-Is there a way to make an auto numbering avalible in vb.net form textbox as the one in Access db columns when we set the datatype as autonumbering?? 2- I'm working on a...
5
by: Stephen Plotnick | last post by:
I'm very new to VB.NET 2003 Here is what I have accomplished: MainSelectForm - Selects an item In a public class I pass a DataViewRow to ItemInformation1 Form ItemInformation2 Form
1
by: ainsley | last post by:
Hi this is going to sound like a very basic question, but I am creating a database in Access which is based on a number of unlimited tables. In my data entry form i have a number of combo boxes...
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....
3
by: Puzzled and Confused | last post by:
It seems like a simple request, but I cannot get it to work. Does anyone know to how to make data from one field auto populate in another field, only if the answer is yes/true? I have a form that I...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.