Help with a solution

M

Mr-Re Man

I need to create a database that would list road names. Each road is then
associated with a map or maps (if the road is long, the street could span a
few maps)

The maps are stored as pdf's on a server.

What I would like is for the road name to be selected from a search screen
and the list of maps associated with that street to be made available so the
user can click the map name or a button to open the corresponding pdf.

I have tried to use the DocMgr database by Arvin Meyer, I sucessfully loaded
in the maps to the table but in terms of streets with mor ethan one map, I
couldn't configure it to my requirements.

If there is another method, I would really appreciate it.

regards
 
X

XPS350

I need to create a database that would list road names.  Each road is then
associated with a map or maps (if the road is long, the street could spana
few maps)

The maps are stored as pdf's on a server.

What I would like is for the road name to be selected from a search screen
and the list of maps associated with that street to be made available so the
user can click the map name or a button to open the corresponding pdf.

I have tried to use the DocMgr database by Arvin Meyer, I sucessfully loaded
in the maps to the table but in terms of streets with mor ethan one map, I
couldn't configure it to my requirements.

If there is another method, I would really appreciate it.

regards

I think you have to create (at least) two additional tables.
A table with streets an a table to connect streets to maps. This table
contains a rerord for each map a street is on.


Groeten,

Peter
http://access.xps350.com
 
S

Steve

You need the following tables:
TblRoad
RoadID
Roadname
<other road fields you might need>

TblRoadMap
RoadMapID
RoadID
MapPath (Full path to map on server)

For data entry you need a form/subform. The main form would be based on
TblRoad and the subform would be based on TblRoadMap.

If you need help with the database, I can help you. I provide help with
Access, Excel and Word applications for a small fee. My fee to create the
database for you would be very modest. Contact me if you want help.

Steve
(e-mail address removed)
 
M

Mr-Re Man

Thank you Peter, can you expand a bit on how to do it please.

How would I open up the pdf documents for example?

So a table for the maps, a table for streets and another table to connect
the two together? How does that work?

many thanks
 
J

John... Visio MVP

Steve said:
If you need help with the database, I can not help you. I do not provide
help with Access, Excel and Word applications for a small fee. My fee to
create the database for you would not be very modest. Contact me if you do
not want real help.

Steve





Stevie is our own personal pet troll who is the only one who does not
understand the concept of FREE peer to peer support!
He offers questionable results at unreasonable prices.

These newsgroups are provided by Microsoft for FREE peer to peer support.
There are many highly qualified individuals who gladly help for free. Stevie
is not one of them, but he is the only one who just does not get the idea of
"FREE" support. He offers questionable results at unreasonable prices. If he
was any good, the "thousands" of people he claims to have helped would be
flooding him with work, but there appears to be a continuous drought and he
needs to constantly grovel for work.

Please do not feed the trolls.

John... Visio MVP
 
M

Mr-Re Man

Thank you Ken for your detailed message, I am going to set aside this morning
to make progress on this. I really appreciate the time you have taken to
respond to this and thanks to the other guys warning me about the leech that
stalks the newsgroups.

I wouldn't have paid him anyway, his style reminds me of the telephone call
I got asking me for my bank details so that they could deposit money from the
government. They're a joke, but the sad thing is that sometimes the good
guys aren't around to warn people and they do make money which probably fuels
them to keep doing it.

I'll be in touch on how I got on.

regards
 
M

Mr-Re Man

Ken, I,m nearly there, it's fantastic, I just keep getting an error when I am
double clicking a map name.

the code for DblClick is highlighting the word varMap in the line
ShellToFile varMap

The error message is
Comile Error:
ByRef argument type mismatch

Also, I don't know if this is something to dow ith it, but I called the
module you asked me to paste in basShellExecute.

Finally, within the table Maps, MapPath was a text box as this was the
server path to the pdf file and map title was the name of the map....is this
correct? I therefore had to change the datatype for MapPath in the
StreetMaps table to Text as well.

Up until clicking on the maps to open, it is superb!

thank you - thank you - thank you
 
M

Mr-Re Man

Thans Ken, I couldn't get it to work, however I found an old webpage of yours
(LINK:
http://community.compuserve.com/n/p...5&nav=messages&webtag=ws-msdevapps&redirCnt=1)
and with what you gave me and this page, I tweaked the code to give me this
below and it worked.

I appreciate your help and time taken to solve this query and apologise if I
have have taken you from your own work. :)

' basShellExecute
Option Compare Database
Option Explicit

Declare Function ShellExecute& Lib "shell32.dll" Alias "ShellExecuteA"
(ByVal _
hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal _
lpParameters As String, ByVal lpDirectory As String, ByVal nshowcm As Long)

Sub ShellToFile(ByVal strPath As String, _
strExtension As String, ByVal lngHwnd As Long)

Dim lngRetVal As Long

If Right(strPath, 3) <> strExtension Then
strPath = strPath & "." & strExtension
End If

lngRetVal = ShellExecute(lngHwnd, "open", strPath, _
vbNullString, CurDir$, 1)
If lngRetVal < 32 Then
MsgBox "Unable to open file " & strPath, vbInformation, "Warning"
End If

End Sub




KenSheridan via AccessMonster.com said:
Mea culpa I'd given you the module code which was only partly amended from
an older version. It should have been:

' basShellExecute
Option Compare Database
Option Explicit

Declare Function ShellExecute& Lib "shell32.dll" Alias "ShellExecuteA" (ByVal
_
hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal _
lpParameters As String, ByVal lpDirectory As String, ByVal nshowcm As Long)

Sub ShellToFile(ByVal strPath As String)

Dim lngRetVal As Long

lngRetVal = ShellExecute(hWndAccessApp, "open", strPath, _
vbNullString, CurDir, SW_SHOWMAXIMIZED)

If lngRetVal < 32 Then
MsgBox "Unable to open file " & strPath, vbInformation, "Warning"
End If

End Sub

This will open the map file maximized. If you want it open in a normal
window change the SW_SHOWMAXIMIZED constant to SW_SHOW. It should recognize
these constants, but if not use their values of 3 or 1 instead. You could of
course change the ShellToFile function so that it takes a second argument to
pass to the Windows API ShellExecute function as its nshowcm argument; you'd
then be able to select how it opens when calling the ShellToFile function.
You'll find the various coinstants listed at:

http://msdn.microsoft.com/en-us/library/ms633548(VS.85).aspx

I notice that in my newsreader first line of the first line of the 3-line
function declaration has been split over two lines, moving the underscore
continuation character to a second line, so if yours has done the same you'll
need to amend it so each of the first two lines ends with the _ continuation
character. Or simply make the declaration one long line.

Ken Sheridan
Stafford, England

Mr-Re Man said:
Ken, I,m nearly there, it's fantastic, I just keep getting an error when I am
double clicking a map name.

the code for DblClick is highlighting the word varMap in the line
ShellToFile varMap

The error message is
Comile Error:
ByRef argument type mismatch

Also, I don't know if this is something to dow ith it, but I called the
module you asked me to paste in basShellExecute.

Finally, within the table Maps, MapPath was a text box as this was the
server path to the pdf file and map title was the name of the map....is this
correct? I therefore had to change the datatype for MapPath in the
StreetMaps table to Text as well.

Up until clicking on the maps to open, it is superb!

thank you - thank you - thank you
As Peter said, you'll need three main tables for this, e.g.
[quoted text clipped - 158 lines]

--



.
 
M

Mr-Re Man

Ken, one final thing, what code do I need to tweak so that only the plans
show up in the search when the corresponding street is selected, as I'm
finding that until a user clicks a street name, their could be hundreds of
Plan No.1 showing, another load for Plan No.2 etc etc.

If the list could remain blank or perhaps just show all the maps that are
available without any duplicates.

thanks again
 
L

Larry Linson

Bugra Ertug Güray said:
I am turkish! :) =) ______________________________

I find that difficult to believe. Turks are too smart to post "chat" in a
newsgroup devoted to technical discusson of and questions and answers about
Microsoft Access database.

Larry Linson
Microsoft Office Access MVP
 
D

De Jager

Mr-Re Man said:
I need to create a database that would list road names. Each road is then
associated with a map or maps (if the road is long, the street could span
a
few maps)

The maps are stored as pdf's on a server.

What I would like is for the road name to be selected from a search screen
and the list of maps associated with that street to be made available so
the
user can click the map name or a button to open the corresponding pdf.

I have tried to use the DocMgr database by Arvin Meyer, I sucessfully
loaded
in the maps to the table but in terms of streets with mor ethan one map, I
couldn't configure it to my requirements.

If there is another method, I would really appreciate it.

regards
 
J

joelgeraldine

gbff* fgffgg
Larry Linson said:
I find that difficult to believe. Turks are too smart to post "chat" in a
newsgroup devoted to technical discusson of and questions and answers
about Microsoft Access database.

Larry Linson
Microsoft Office Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top