?
Solved

Data Access Page Drop Down Hyperlink

Posted on 2007-07-31
24
Medium Priority
?
1,366 Views
Last Modified: 2013-11-29
I need a drop-down list that has hyperlinks as values and passes the values onto another Data Access Page as a filter.  I am submitting this for the third time.  I wish I can give more than 500 points but I can't.
0
Comment
Question by:VBDATAMAN
  • 8
  • 7
  • 2
  • +5
23 Comments
 

Author Comment

by:VBDATAMAN
ID: 19604184
ok I can try and attemt to answer myself but I will wait a couple of minutes
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19606554
hi,
  instead of deleting and resubmitting it all the time, keep the question open.
  you have to note that all "experts" are non-paid and hence volunteering, and currently you might experience many people being on vacation...
angelIII, zone advisor
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19606560
now, in regards to your question, can you give a bit more details about what you have:
I assume ms access as database (and a table with the values for the drop-down?)
how do you call the other page from the drop down? what do you want to be passed?
do you know how to pass data from one page to another?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:VBDATAMAN
ID: 19608192
ok, thanks, I have an MS Access Database which has a table for the values from the drop down.  I am trying to click on the drop down select a value and that will open up another page and filter records based on the value I selected on the previous page.

I want to call the other page from the drop down through a hyperlink, that is on the afteraction of the drop down, a hyperlink connects to page #2.  I want to pass the value from page#1 from the drop down to page #2 as the filter criteria for the records.  No I do not know how to pass data from one page to another.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19608319
I don't know where you got the idea of using "hyperlink" here, in access, you just create a short vba macro on the dropdown's selection changed/itemclick events, and open the other form, and set the form's filter criteria...

Private Sub Combo0_Change()
 
  Dim f As Form_Page2Form
 
  set f = new Form_Page2Form    <<< create a (new) instance of page2
  f.FilterOn = False    <<< disable any existing filter
  f.Filter = " somefield = somevalue "   <<< this will be based on the criteria in Page1
  f.FilterOn = True    <<< apply the filter
 
  f.Visible = True    <<<< show the form
   
End Sub
0
 

Author Comment

by:VBDATAMAN
ID: 19608522
i don't want to use forms, I will be using data access pages via Internet Explorer, its no problem doing it with the forms on Microsoft Access but when I try saving the form as a data access page it doesn't like the macros when I try to run it on Internet Explorer
0
 

Author Comment

by:VBDATAMAN
ID: 19608533
by the way, thanks for responding I do realize this is an all volunteer system, I have unlimited points and I willing to share as many as I can today since I am under a little pressure here to get this data access page working.

I have several more questions and wouldn't mind giving you all of the 500 points for each question.
0
 

Author Comment

by:VBDATAMAN
ID: 19608567
basically what i need help with is the syntax, if you can help me out with the syntax I would appreciate it, or if you know of a website that contains all types of syntaxes.  I appreciate any responses you can give me as quick as possible.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19608693
>I will be using data access pages via Internet Explorer
then, sorry, but I am out... I have 0 experience with that, and actually no idea about that has to work... :-(
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19608725
I have asked a couple of folks that are better in access than I am to look here...
0
 

Author Comment

by:VBDATAMAN
ID: 19608829
thanks
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 19609058
Since Access in general is not a very good data source for a Web application, and since many Access experts are also ASP experts, many Access experts just don't use Data Access Pages.  I suspect you won't get a world of help here.

Sorry.
-Jim
0
 
LVL 15

Expert Comment

by:Eric AKA Netminder
ID: 19609330
"...I will be using data access pages via Internet Explorer,..."

Is this a web-based application? Or is it an internal network?

If it's the former, you're going to find that Access macros and the web don't mix very well. ASP can't tell an Access database to run a macro or a procedure in a module the same way it can tell a SQL database to run a stored procedure (or rather, it couldn't as of Access2000 -- that could have changed).

Jim is largely correct in saying that generally, most ASP people will use some other database for a web application, but using Access isn't impossible or even unsatisfactory if you're not expecting a ton of traffic. In your case, I would highly recommend you consider using ASP. Doing what you want to do isn't really difficult, but using Data Access Pages is going to make it so. If you want, we can get the Moderators or the Zone Advisor to cross-post this for you.

JMHO,

ep
0
 

Author Comment

by:VBDATAMAN
ID: 19610779
ericpete, you are exactly right, this application will be on an internal network for only a few users.  Please see if the moderators or the Zone Advisor can cross post this so I can get some feedback on how to do it using Data Access Page, I gues the reason why I want to use Data Access Pages is because it seems so much simpler, Is there another way to do it?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19610843
your question is already crossposted to 3 zones:
    * Access Coding/Macros
    * SQL Query Syntax
    * Access Architecture/Design
so the only thing you can do is to post a pointer question in any other zone(s) and point it to this question.

angelIII, zone advisor
0
 
LVL 15

Expert Comment

by:Eric AKA Netminder
ID: 19611269
VBDATAMAN,

You could remove it from SQL Query Syntax or Architecture/Design; the issue has little or nothing to do with it. But I don't think that's really your best solution. It DOES have to do with Forms, but your best bet is to post it in the top level Access zone. Perhaps angelIII would be so good as to take care of that.

"...I gues the reason why I want to use Data Access Pages is because it seems so much simpler.."

I suppose that's reasonable. The problem is that you can't get there from here. For what you want to do, forms are the way to go.

Somewhere around here, I have an app that has a form that essentially does what you want yours to do: You want to have information displayed based on the selection of an item from a list, as I understand it.

So... it's not really that complicated. You build your list box. You do a series commands based on the selection (it's been a while since I actually had to do this, so I'm just going to post the framework, but I can dig up specific code, or one of the real Experts can help you as well).

Then you create a module for that list box that says

Case (SelectionMadeFromList)
   Case1: DoThisStuff
   Case2: DoSomethingElse
   Case3: DoSomethingEntirelyDifferent
End Case

You can also do it with a series of If/Then/Else statements. But you can use each Case to build a series of functions, including opening a different form or, if you're really tricky and the source information is the same, use the same form with hidden fields that become visible only when you need them.

ep
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19611460
question "rezoned" to ms access and asp zone.
0
 

Author Comment

by:VBDATAMAN
ID: 19611713
"so the only thing you can do is to post a pointer question in any other zone(s) and point it to this question"

I am sorry but I am a newbie and I do not know how to do this.  As for the forms, I know how to do it in the forms with no problem, I used if statements.  What I can't figure out is how to do it on Data Access Pages.  I am going to try and do it with ASP and see how far I get.

0
 
LVL 35

Expert Comment

by:ShineOn
ID: 19613135
OK, you want to do what?  

I'm very confused.  What is the point of the hyperlinks?  Would they launch another DAP or what?

You said something about the hyperlink value being used as a filter for another DAP.  In what fashion?

0
 
LVL 29

Accepted Solution

by:
rdivilbiss earned 1000 total points
ID: 19613387
Code and ample comments are on this live example page.

http://www.rodsdot.com/ee/accessDropDownList.asp

Regards,
Rod
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 19613428
Ans a version that does not require JavaScript, but will require a submit button.

http://www.rodsdot.com/ee/accessDropDownList1.asp
0
 
LVL 46

Assisted Solution

by:fritz_the_blank
fritz_the_blank earned 1000 total points
ID: 19613772
A few questions please:

1) Do the hyperlinks come from a table or do you use a static list?
2) If you use a table, does that table have an auto-increment field?
3) Using filters may not be the best approach with a web application. Using the passed parameter in a WHERE clause on the receiving page may be a better option.

I am asking for the following reasons:

If you are using a static list, then you will just do something like this:

<select name="strURL">
    <option value="http://www.cnn.com">CNN</option>
    <option value="http://www.mnsbc.com">MNSBC</option>
    <option value="http://www.pbs.org">PBS</option>
</select>


If you are taking the value from the database, you have two options:

a) if you have no auto increment field, then you would have to do something like this:

<select name="strURL">
<%
do while not objRS.eof
   response.write("<option value=""" & objRS("strURL")  & """>" & objRS("strURLFriendlyName") & "</option>")
   objRS.MoveNext
Loop
%>

b) if you have an auto increment field, I would use that instead of the actual URL. You could then pass the integer ID to the receiving page as a parameter instead.


In any event, if you would be willing to post the table name and the name and types of your fields, someone here will point you in the right direction.

FtB

0
 
LVL 1

Expert Comment

by:Computer101
ID: 21177277
Forced accept.

Computer101
EE Admin
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

862 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