sharing read only tables in multi-user application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am developing a multi-user Access application with a front and back end.
I have several tables that I use for combo box lists that are updated
frequently by another application. I set these up as text files that are
linked into the front end so that the text file could be replaced as needed
without any importing or code changes needed. This works beautifully until
the second person tries to use the application. Only one person at a time
is allowed by Access to use these lists.

The important points here are that the text files are recreated on a daily
basis, and are not updated by the Access application. How can I set up my
application to allow this to happen?
 
:~) So it works beautifully until it doesn't work ?

You can't do it that way. Access always exclusively
locks linked text files. Make a local copy, or use
a database table, or use code to read the values into
the combo box source, or whatever.

(david)
 
Thanks for the advice!

Can I use code to read the contents of a text file into the combo box
source? Could you give me an illustration of how to do this?
 
You have to set the row source type, to be a list,
then you can set the row source to a list in this form:
"1,One,2,Two,3,Three"
(that is for two columns, bound to column one, displaying column 2)

air code:
cb.rowsource = fnGetRowSource()

function fnGetRowSource() as string
static s as string
if s = "" then
set rs = db.openrecordset("linkedtable")
while not rs.eof
for i = 0 to rs.fields.count-1
s = s & rs.fields(i) & ";"
next i
rs.movenext
wend
endif
fnGetRowSource = s
end function.

or you can google for file reading code, using Open

dim i as long
i = freefile
open "c:\myfile.txt" for input as #i

(david)
 
Back
Top