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
Closed Thread
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 21st, 2004, 10:30 AM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve and display data without tbl messed up

Hi,
I would like to use a code selected in Form 2 to retrieve the data in a table and display the row on Form 1. I have trouble to have the data shown on Form-1 without backend table messed up after selecting a code from Form-2.

Here are the table and Forms,

Table: myDb

Name Type Definition Parent
DI A1 Text 1 PD
ED A2 Text 2 DI
PM A2 Text 3 DI

Form-1 (Single Form):
The form Includes: Text Fields, a Combo box and buttons (such as Delete)
Form-1 Properties
 Record Source: SELECT myDb.definition, myDb.parent, myDb.type FROM myDb WHERE myDb.name = Forms![Form-1]! cbxNm

Combo box, cbxNm: include a list of Name of myDb, DI, ED, PM. …,
Combo box properties:
1. unbound
2. Row Source Type: Table/Query
3. Row Source: SELECT myDb.Name FROM myDb WHERE myDb.Type = Forms![Form-1]!Type ORDER BY myDb.Name

How to work:
1. Select “DI” from the combo box
2. Type = “A1”, Definition = “Test 1", Parent = “PD” are displayed in text fields of Form-1
3. Click on Delete button to retrieve the information of where “DI” is being used, and open Form-2 to display the data on it

Form-2
Display the where used information in a tabular format:

Deleted code Name something else
------------ -------- ------------------
DI ED ….
DI PM ….

How to work:
1. Double click a Name, for example “PM”
2. Focus shifts to Form-1
3. "PM” is focused and highlighted on the combo box
4. Display PM related information in the text fields on Form-1 (???)
I expected the related information of “PM”, Type = A2, Definition = Test 3 and Parent-class=”DI”, are displayed on Form-1 after “PM” is focused on combo box. I tried to use “PM” as key for SQL selection to get data and used form’s setValue to set the data on each text field of Form-1. Front end looked ok, but table myDb was messed up. How can I change it?

Thanks in advance for suggestions.

lx


Closed Thread


Thread Tools
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
Retrieve and Display Image asters .NET Framework 1.x 0 September 18th, 2008 03:56 AM
Adding Data to aTbl from another Tbl fwebb Access 3 April 10th, 2007 08:21 AM
retrieve and display selected results babywind BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 February 11th, 2005 04:23 AM
Qry to retrieve from 2 tables and display tsimsha Classic ASP Databases 3 October 29th, 2004 02:03 AM



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


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