-
I have a program in which the user selects a database file from a file listbox, and clicks a display button, which shows a new form with the data control on it. What I need help with (again) is getting the RecordSource from the selected file (the record source will be equal to the file's name, without the ".mdb" extension). Example: if the user selects "Example.mdb", the RecordSource needs to be "Example". If anyone understands my explanation, please help. All help is very greatly appreciated.
-
I am not sure if this will work, but try the following:
for counter = 0 to len(database name)
char = strRS & mid(database name, counter,1)
if char = "." then
char = ""
x.recordsource = strRS
end if
strRS = strRS & char
next counter
I hope this will work, and is not totally off the beaten track!