Hmmm... 
Author Message
 Hmmm...

Trying to figure the best manner in which to do this...

There's a table with one record. There are 15 fields in the table... Each of
the fields is the name of a label.

I would normally set this type of table up as a table of one field with 15
records...

Basically, it's used within a report to represent the labels above another
set of fields...

The fields represent chemical symbols and the table with all the data holds
quantity fields for each of the symbols.

LOL This is contorting my mind so bad. I'm just not used to doing things in
the way this was done. I'd have set the chemical symbols up in a table with
one field. This would have made the addition of symbols very easy to
perform. It would have introduced complications into the reports... but
because the labels are static labels... the labels could be read from a
table of one field and put into an array which could then be used to fill
the labels on the report.

I had a question when I started to post... but I think I figured it out.

--
Jim Carlock
http://www.*-*-*.com/
Feel free to post back to the newsgroup for all to witness!



Wed, 14 Dec 2005 08:43:33 GMT  
 Hmmm...
Oh, here is what I wanted to ask...

Given a table of 15 fields with one recordset... while it's just as easy to
type this into the new recordset that will will have 15 records and one
field...

Is there a simple query that can be performed to accomplish?

For Each Field in Table
  rs.AddItem Field.Name
Next Field

I think I just figured this out as well.

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup for all to witness!



Wed, 14 Dec 2005 09:02:04 GMT  
 Hmmm...
I've tried to set up some code inside of the VBApp studio that comes with
Access. I'm using the following code in the file I want this code to perform
on...

  strPath = "BatDat2k.mdb"
  Set db = DAO.OpenDatabase(strPath, False, False)
  Set rs = db.OpenRecordset("tOxLabels")

It errors out by telling me that it can't find the database, BatDat2k.mdb.
The code itself resides inside of the BatDat2k.mdb file... And because the
database is already open in Access, why would I even need to use the Set db
= DAO.OpenDatabase() function at all?

I tried to use strPath = App.Path & "\BatDat2k.mdb" but that didn't work
either. There is no App. function inside of an Access VBApp module. I tried
the Application object as well, but there's no Path property on it.

Anyone have an answer right off the top of there head?

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup for all to witness!



Wed, 14 Dec 2005 09:46:59 GMT  
 Hmmm...
Found it!

Application.CurrentProject.Path

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup for all to witness!



Wed, 14 Dec 2005 09:53:29 GMT  
 Hmmm...
Yes, use ADO not DAO. DAO is poor

Quote:
>-----Original Message-----
>I've tried to set up some code inside of the VBApp studio
that comes with
>Access. I'm using the following code in the file I want

this code to perform
Quote:
>on...

>  strPath = "BatDat2k.mdb"
>  Set db = DAO.OpenDatabase(strPath, False, False)
>  Set rs = db.OpenRecordset("tOxLabels")

>It errors out by telling me that it can't find the

database, BatDat2k.mdb.
Quote:
>The code itself resides inside of the BatDat2k.mdb

file... And because the
Quote:
>database is already open in Access, why would I even need
to use the Set db
>= DAO.OpenDatabase() function at all?

>I tried to use strPath = App.Path & "\BatDat2k.mdb" but
that didn't work
>either. There is no App. function inside of an Access

VBApp module. I tried
Quote:
>the Application object as well, but there's no Path
property on it.

>Anyone have an answer right off the top of there head?

>--
>Jim Carlock
>http://www.microcosmotalk.com
>Feel free to post back to the newsgroup for all to
witness!

>.



Fri, 16 Dec 2005 20:10:58 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. hmmm still doesn't work

2. hmmm...Make EXE?

3. Hmmm....maybe a bit much

4. hmmm

5. Printing....hmmm...

6. Popup Menu Hmmm.

7. Popup Menu Hmmm.

8. hmmm, is this a possible conversion....?

9. Setting the timer..hmmm...

10. Creating tables in ADOX ... hmmm

11. hmmm...

12. hmmm

 

 
Powered by phpBB® Forum Software