Solved

Open a form through macro based on a value from combobox

Posted on 2004-04-17
5
393 Views
Last Modified: 2006-11-17
as an e.g
Table Structure

Person
{
id
Name
address
phone num
}



i have a form named "Search Name" it has a combo box named "cmbNameSearch" which is filled with Name column values of Person table . now at combobx click event i want another for m "Person Detail" to be opened which should display only those record whose Name colmun value is one which i selected in the combobox . i have a macro that i call on combobox click event that opens the detail form . but i am having trouble getting the desired result .

any help woud be appreciated .

Thanks

grouper 15

i filled the  combo box
0
Comment
Question by:grouper15
  • 2
  • 2
5 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 10849026
Try this:

if isNull(cmbNameSearch)=False and cmbNameSearch.value <> "" then
   docmd.OpenForm "YouFormName",acNormal,"Name = '" & me.cmbNameSearch.value & "'"
end if
0
 
LVL 3

Author Comment

by:grouper15
ID: 10849392
ryancys

i m not using VBA . i need to done that in Forms or Macros within the Access 2003 environment
0
 
LVL 17

Accepted Solution

by:
aflockhart earned 100 total points
ID: 10849710
after update event on combo box : run Macro1

MAcro 1:
Action : OPENFORM
Parameters:

formname =Person Detail
WHERE condition :  "[Name]=[Forms]![Search Name]![cmbNameSearch]"

0
 
LVL 17

Expert Comment

by:aflockhart
ID: 10849718
... but if you want more robustness and error checking I'd go with VBA.
0
 
LVL 3

Author Comment

by:grouper15
ID: 10852626
aflockhart i have got the hint from your reply of
[Name]=[Forms]![Search Name]![cmbNameSearch]

The actual thing can be done by altering the query criteria

but its not the correct answer any how u were the closet so i shall accept your answer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sum Multiple Columns in Access Query 5 51
Library not Registered 16 50
data analyst 3 50
Running Total in Access 4 17
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now