Results 1 to 2 of 2

Thread: Finding RecordSource

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Location
    Wichita, KS, US
    Posts
    10

    Post

    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.

  2. #2
    Junior Member
    Join Date
    Jun 1999
    Location
    South Africa
    Posts
    22

    Post

    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width