Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / October 2006

Tip: Looking for answers? Try searching our database.

I can't believe I can't Figure this out.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RonnieK - 27 Oct 2006 01:03 GMT
This has to be very simple... but...
I have a form that displays records in a list box based on a check box = Yes.
So I have about 10 or so records showing in the list box.  When I click on
one of the records, it should open a new form to display more details of the
selected record.  The problem is that it always displays the first record in
the table.

I have a macro that displays the detailed record from the list box (after I
pick from the list box), but I can't seem to figure out how to make the macro
display the record I clicked on.  The macro is simple:

              OpenForm  (which opens the form to display the details of the
record)
              FindRecord.

In the "FindRecord" I put  "ID"  as the "Find What" in the arguments pane.
"ID" is the primary key field in the
master file record I'm trying to select.

Any help will be greatly appreciated.  
Ronnie Keith
Damian S - 27 Oct 2006 01:51 GMT
Hi RonnieK,

Why not set the recordsource of the form you are opening to select records
that match the item you selected in the listbox eg:

select * from TABLE where FIELDID = forms!FORMNAME.LISTBOX

Hopt that helps.

Damian.

> This has to be very simple... but...
> I have a form that displays records in a list box based on a check box = Yes.
[quoted text clipped - 17 lines]
> Any help will be greatly appreciated.  
> Ronnie Keith
RonnieK - 27 Oct 2006 23:46 GMT
Damian,  Thanks

I apparently can't figure out the syntax for this.  

My table name is "Client Master File"  (Where the detail data comes from)

My list box form is "Processing - Select Clients". (This is the form that
contains the list box "Processing Client List").

My List Box Name (In the "Processing - Select Clients" Form) is "Processing
Client List" (This is the list box in the first form that I select the record
I want to use in the "Processing Detail" form).

The form that I'm trying to get the information to show in is "Processing
Detail"

ID is the primary key  (auto number).
This is a "flat file"  I'm only using one table for this.

Here's what it looks to me like I should enter into the "recordsource" for
the form "Processing Detail"

select * from Client Master File where ID = forms!Processing - Select Client.
Processing Client List

But I get errors.

Again, I really appreciate any help you can give me.  

>Why not set the recordsource of the form you are opening to select records
>that match the item you selected in the listbox eg:
[quoted text clipped - 10 lines]
>> Any help will be greatly appreciated.  
>> Ronnie Keith
SteveS - 31 Oct 2006 11:57 GMT
PMFJI,

The problem is that you used spaces and special characters when you named
your objects. As you have found, spaces in names of objects causes you
headaches.

Since you have spaces in the names, you need to enclose them in brackets:

Try this:

Sselect * from [Client Master File] Where [ID] = forms![Processing - Select
Client].
[Processing Client List]

If you must separate words, use the underscore  Client_Master_File

This is another way  (no spaces) >>   ClientMasterFile

Also, search the web for "naming conventions". Here is one page:

http://www.mvps.org/access/general/gen0012.htm

A consistant nameing convention makes it easierto tell what the object is

if the object is then the prefix is

     table ............ tbl
     form..............frm
    listbox............lb    (lower case L )

So the recordsource would look like:
(should be one line)

Sselect * from tblClientMasterFile where [ID] =
forms!frmProcessingSelectClient.lbProcessingClientList

Just remember - if you use spaces in object names, enclose them in brackets :)

BTW, form "Processing - Select Clients" must bo open when you open form
"Processing Detail".

HTH
Signature

Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)

> Damian,  Thanks
>
[quoted text clipped - 39 lines]
> >> Any help will be greatly appreciated.  
> >> Ronnie Keith
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.