PDA

View Full Version : MS Access Help


Greystone Thorngage
12-01-2005, 11:47 AM
I have a table that has lot numbers, house numbers, then street name.

I made a query to ask for the house number and then output the Lot number, house number, and address.

Is there a way to make it rerun...basically i need to do this repeatedly, and closing and reopening the query each time is a pain in the ass.

Arisensun
12-01-2005, 01:27 PM
You could create a form with a button and drop down list that launches the query. I was going to write out how to do this, but I found a tutorial that basically says the same thing. If you need more help just let me know.

http://www.fontstuff.com/access/acctut08.htm

http://www.fontstuff.com/access/acctut17.htm

Sanchek
12-01-2005, 04:14 PM
Records menu. Refresh.

Greystone Thorngage
12-02-2005, 08:50 AM
doesnt work Sanchek, tried it

Roliel
12-02-2005, 09:16 AM
Under what circumstances do you need it to rerun? And what do you mean by closing and reopening the query? Are you referring to the query object?

Sanchek
12-02-2005, 09:52 AM
I think he just wants to have it prompt him for the house number again and re-run the query based on that.

If refresh didn't work, you probably will have to set up a form. Once you get into it, it's pretty easy to do.

Greystone Thorngage
12-02-2005, 11:46 AM
yes, basically i get a list of addresses, i need to look up lot numbers. I usually look up 15-30 at a time, and wanted a way to run it, then it prompt or a f-key or something to make it rerun again.....pretty much how Sanchek said it.

Arisensun
12-03-2005, 10:47 PM
Did you get this to work for you? Let me know if you need more help.

Greystone Thorngage
12-05-2005, 09:47 AM
The weekend hit and i stopped thinking about it. It is still troubling me though.

mirdorr
12-05-2005, 03:33 PM
Heh. Put it in a text file, drop it on a linux box and keep re-running "cat | grep" and change what you search for.

Roliel
12-06-2005, 12:13 AM
Grey, are you accessing this through a web app, or something like a query analyzer? If it's a web app, and you're able to write code on the server it's running on, you could use a pretty straightforward JSP script to pull that information down and display it on IE or whatever.

<%@ page import = "java.sql.*" %>

<%
String testID = request.getParameter("userID");
String testPassword = request.getParameter("userPassword");
String dsLoc = "jdbc:odbc:DS4JAVA";
Connection dsConnection = null;
String classPath = "sun.jdbc.odbc.JdbcOdbcDriver";
Class.forName(classPath);
dsConnection = DriverManager.getConnection(dsLoc, testID, testPassword);

%>

<%
Statement stm = null;
ResultSet rst = null;
stm = dsConnection.createStatement();
String query = "SELECT * FROM user";
rst = stm.executeQuery(query);
%>
<form>
<% while(rst.next()){ %>

<input type = text name = field1 value = <%= rst.getString("column1") %>>
<input type = text name = field2 value = <%= rst.getString("column2") %>>
<input type = text name = field3 value = <%= rst.getString("column3") %>>
<%= "<br>" %>

<%}%>
</form>


<%
rst.close();
stm.close();
dsConnection.close();
%>