Search results

  1. C

    Calling a module

    The module is a separate Access object. Like you have tables, queries, forms, macros, I've created a module. To simplify things, say it does the following: Private Sub modUpdateTables() msgbox "hello world!" End Sub I have a button that I would like to call this from Private Sub...
  2. C

    Calling a module

    Can someone give me a hint as to how to call a module from VB? I've created the module modUpdateTables, but I can't find out how to run it from my code. I've looked in the help, online and otherwise. Anyone know how that's done? Thanks, Casey
  3. C

    Form won't stay put when opened

    Thanks, ghudson. That did the trick! I appreciate your help.
  4. C

    Form won't stay put when opened

    I have a Main Form that utilizes tabs to control several other forms by opening, closing and making them visible/invisible. One of the forms needs to be closed when its tab on the Main form is unselected. The problem is that once the form is closed, when it opens up again it opens right infront...
  5. C

    UNION query MS Jet database engine cannot find the input table or query.

    Sorry for not responding sooner. The following is the basic logic. SubMain set wrkJet = Workspace set db = wrkJet.DbConnection strQuery = SQL statement on non-local table set rs = Open.Recordset(strQuery) Calls Sub1(calculates approx 20,000 records using connection and returns to SubMain)...
  6. C

    UNION query MS Jet database engine cannot find the input table or query.

    Yes. I'm actually currently processing about 20,000 records this way per selected timeframe. I've created another sub to create the UNION query and upon trying to reconnect, the error is thrown. Can you see a problem with the connection?
  7. C

    UNION query MS Jet database engine cannot find the input table or query.

    You could be right, but what gets me is that, everything works with this connection except when I use the UNION statement. When I just call one query at a time, the VB returns the recordset without error??? So I'm thinking the UNION statement is causing some conflict. Perhaps some of the...
  8. C

    UNION query MS Jet database engine cannot find the input table or query.

    Actually, that works in both Query Builder if the table exits within the currentdb and MS-SQL Query Analyzer. Unfortunately, I'm trying to call a table that's not in the currentdb. That is why I'm using the Workspace. All queries work in this way so far, but when I try to use the UNION statement...
  9. C

    UNION query MS Jet database engine cannot find the input table or query.

    Hello All, I'm trying to run a UNION query that joins five queries through a MS WorkSpace into a DAO.recordset in VB. I'm pulling the data from a SQL Server Database through VB in Access. I'm attempting to open a recordset with a query passed to it as a string. The query is below. For some...
  10. C

    Find/Delete Table in TableDefs Collection

    I guess the reason that it wouldnb't delete the table is that I had a form open that was making use of the data in the table "oopsie". I'm guessing that's the problem. I'll keep playing with it.
  11. C

    Find/Delete Table in TableDefs Collection

    Actually, I closed the db and reopened it and now the relations are gone, but the tables are still there. I have them set up in the Relationships. Do I need to delete them from the Relationships before the changes take affect? I'm puzzled why this is occuring. Before I added the relations...
  12. C

    Find/Delete Table in TableDefs Collection

    raskew, I didn't notice this right away, but for some reason the part that's supposed to delete the relations is not working correctly. It's not finding the relations that I have between the tables. When I step through the code, it states "object variable or With block variable not set" when I...
  13. C

    CreateField(dbBoolean) Lookup = CheckBox

    pdx_man, Awesome! That works great! Thanks much.
  14. C

    CreateField(dbBoolean) Lookup = CheckBox

    Hello, Can someone direct me on changing the Lookup property on a boolean field I've created using the CreateField DAO method so the field is a checkbox? I would like it to be a Checkbox type, but do not see a way to do it using DAO. The way I've done it below gives me a 0 or 1. I would prefer...
  15. C

    generate a table from a sql string VBA

    Copy entire record and paste it??? Thanks Summerwind, I broke down and developed an entire procedure to create tables and delete tables with the CreateTableDef method. Which is sort of the same thing. I have that code working (sort of), but now I need to populate the tables. Ohh boy. Anyone...
  16. C

    Find/Delete Table in TableDefs Collection

    That worked. Just Plugged it in and it Played. Now if I could get the logic corrected in the rest of the program. Thanks.
  17. C

    Division by Zero?

    GROUP BY clause It is very wierd that if I remove the GROUP BY clause, the query runs without the "type-mismatch" error. When I re-enter the GROUP BY clause, it gives me the error again. Can anyone give me a clue as to why this would happen? Thanks,
  18. C

    Find/Delete Table in TableDefs Collection

    Hello, I am trying to delete a set of tables using the TableDefs.Delete method. I would like to specify a TableName and have VB search the TableDefs.Name to see if that table exists. If it does, I would like to delete it. If it doesn't exist, I would like to search on the next TableName. I...
  19. C

    Division by Zero?

    Thanks, Pat! That seemed to work. I have another problem now. It says that there's a type mismatch between the criteria. I think it's with the CategoryID; some are text and others are numbers. Is there something I can do to make these match. Possibly encapsulate them with the Str() or Val()...
  20. C

    Division by Zero?

    Good point, Pat. I've done that and have found some division calculations. Would you suggest putting a iif() function to test for a value = 0 on the denominator? Or is there a better way to do this? Thanks,
Back
Top Bottom