473,385 Members | 1,531 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,385 software developers and data experts.

Opening a select record from a list box in a new form?

Hi guys hope you can help with this one,

I have a list box being fed by a table, the list box has 3 columns with the first being an ID number and displays the records that are saved in the table. I want to allow the user to double click on one of the records shown the list box which in turn would open up a form which would be populated with record that you clicked on.
I have tried many different ways to link the ID number with the record saved in the table but have had no such luck, any help or guidance would be brilliant!

Thanks!
Oct 24 '08 #1
8 2583
NeoPa
32,556 Expert Mod 16PB
What are the relevant parameters of the ListBox control set to?
Oct 24 '08 #2
Sorry i have only just got back into Access programming so i am still getting back up to speed with it, i was hoping we would be able to start from scratch?
Oct 24 '08 #3
NeoPa
32,556 Expert Mod 16PB
It seems we're going to need to concentrate to communicate here.

What do you mean start from scratch?

Is my question complicated for you?
Oct 24 '08 #4
It seems we're going to need to concentrate to communicate here.

What do you mean start from scratch?

Is my question complicated for you?

Yes sorry i dont understand what you mean
Oct 24 '08 #5
GazMathias
228 Expert 128KB
The simple way to achieve what you want is to have the query behind the form you want opened look at the listbox.

Type: Forms![YourForm]![YourList] in "Criteria" in the query design mode.

Then have the double click event of the list open the new form.

This does restrict you to only opening the form in this way, so a better way would be to pass the ID number in the OpenForm command:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm stDocName, , , "[IDFieldName]=" & Me![YourList]
Also, make sure the Bound Column in the list is set to the column number containing the ID field.

Gaz
Oct 24 '08 #6
NeoPa
32,556 Expert Mod 16PB
Yes sorry i dont understand what you mean
OK. In the absense of direct response to my questions I will assume that you are happy dealing with Gaz. I suspect we would struggle to understand each other anyway, so no loss.

Of course, if you need me holler.
Oct 24 '08 #7
Gaz,


I understand what you said and added that function in, instead i am using a button rather a double click event. When i tried running the formula i had a message box asking me for the Parameter value, rather than going straight to the form. Do you know why this is?
Oct 24 '08 #8
GazMathias
228 Expert 128KB
Gaz,


I understand what you said and added that function in, instead i am using a button rather a double click event. When i tried running the formula i had a message box asking me for the Parameter value, rather than going straight to the form. Do you know why this is?
Sure, make sure that all forms, controls and fields are referenced correctly throughout.
Oct 24 '08 #9

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

Similar topics

6
by: Robin S. | last post by:
Originally I wanted a list box which selects which record is the current one within the same form. Easy enough until Access takes a dump when one is deleted and then someone tries to select it in...
9
by: BLUE WATER | last post by:
Help, When I am finished entering in data into my form A, I press the save button that saves this new data to a new record. However I would like my other form to open at a specific record, the...
3
by: Simon Rowe | last post by:
Probably really simple but I cant work it out... I have a list box on a form with a few records in. When I open the form the first record is sort of highlight with a dashed box, when I cursor...
0
by: Susan Bricker | last post by:
The following error: "The current field must match the join key '?' in the table that seves as t the 'one' side of one-to-many relationship. Enter a record in the 'one' side table with the...
5
by: john | last post by:
In this single-user app I have a form with members. In the related table I have a field 'Select' with which the user can select a record. I have two buttons on the form (All and None) that select...
5
by: Matthew Wells | last post by:
I have a listbox set to simple multi select. For this example, users only select one item at a time. I have command buttons on the form for First, Previous, Next, Last, New (record). The form...
1
by: Coll | last post by:
I have a form with a subform on it. On my main form, you select an employee id number and the top portion of form fills in with data, and the bottom portion of the form,which is a subform, lists...
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
6
by: woodey2002 | last post by:
Hi Everyone. Thanks for your time. I am trying to create a search form that will allow users to select criteria from multiple multi select boxes. So far i have managed to achieve a search option...
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.