Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 3rd, 2003, 05:35 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default fields from tables to update

hi all,

i have a form where there are fields like name, id (staff_table), Accountno (staff_Account_Table), branch code (Branch_Table) etc. they are from 3 different tables.

the form will have the branch code empty where the user will key in the branch code. i want the branch code and branch name to be reflected /updated into my account table once the user entered the branch code which means that the branch name will be updated automatically.

how can i do that???

pls advice
nono

Reply With Quote
  #2 (permalink)  
Old November 3rd, 2003, 10:38 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please provide table structure with complete PK/FK descriptions and relationships, IE One to Many.



Sal
Reply With Quote
  #3 (permalink)  
Old November 3rd, 2003, 10:35 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

in my branchtable, i have :
- branchCode (pk)
- branchName

in my staff_table, i have : (these are the fields that will be on my main form)
- staff id
- name
- contact no

in my staff_account_table , i have : (these are the fields in my subform)
- accountno
- account type
- branchcode (link to branchtable - fk)
- salary
- staffid (link to staff_table- fk)

i have another form that displays all the information on this staff when they select from the combo box. the form include fields of :
- staffid
- name
- contactno
- branchName (from branchtable)
- accountno
- account type
- salary

how can i display the all this information in my form. how can i link all these 3 tables to display the info?? how can i retrieve the branch code of the staff and display it as branch name in this form??

this is what i have done: under the record source of my form, i place this codings

SELECT staff_Table.staffid, staff_Table.name, staff_Table.[contact no], staff_account_Table.[account no], staff_account_Table.[account type] , staff_account_Table.[salary] FROM staff_Table INNER JOIN staff_Account_Table ON staff_Table.staffid = staff_Account_Table.staffid WHERE (((staff_Table.staffid)=Forms!frmSearch!cboSelectG roup));

how can i display the branch name???

pls advice
nono
Reply With Quote
  #4 (permalink)  
Old November 5th, 2003, 04:07 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi all,

the problem is solved by using DLookup.
Your help is greatly appreciated.

Cheers!
nono

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to match data in all fields in 2 tables sunny76 Access 0 April 14th, 2008 09:03 PM
Compare two fields from different tables pallone SQL Server 2000 10 March 23rd, 2007 05:14 PM
Blank fields - queries with many tables dvarrin Crystal Reports 0 February 1st, 2005 05:43 AM
Attaching objects to ole fields in tables william.murray BOOK: Access 2003 VBA Programmer's Reference 0 December 8th, 2004 08:21 AM
Pooling fields from two tables into one view eoffshore SQL Language 4 August 2nd, 2004 05:42 AM



All times are GMT -4. The time now is 01:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.