Search results

  1. M

    Admin rights using VBA?

    The things is user groups have been assigned to the database as all users are not permitted to have complete access. So if an end user who doesn't have all privileges (as he logs on with his account) wants to run this routine which requires administrator privileges, how can he run the routine...
  2. M

    Admin rights using VBA?

    How could this be done? Could you please elaborate a bit more. The module is invoked from the print command button on a form? How can I prompt for a password and assign which users can run the delete? Thanks
  3. M

    Admin rights using VBA?

    Not sure if this is possible.... My Access front db users have restricted rights and while executing a VBA module (which requires deleting a table in the back db) , an error is thrown up saying it requires administrator privileges to run. The module works fine when I log on through the Admin...
  4. M

    Make-Table query using VBA

    It gives an error on Print saying it doesn't apply to a suitable object. Any other ways of copying tables from one database to another?
  5. M

    Make-Table query using VBA

    Creating a Table in another database Thanks anyways for yr time...........much appreciated. I want to now create the tables in another database titled "IGB" located in: "D:\Project\INST\db\bdb" How can I modify the SQL code below or the VBA module so that both tables are created in the...
  6. M

    Make-Table query using VBA

    I don't want to filter based on the input parameter, instead I just need to display the input parameter in one of the columns of the created table. The input parameter is highlighted in the SQL code below : SELECT "ABC" AS CLIENT, "XYZ" AS PROJECT, "Cable Schedule" AS DOC_NAME...
  7. M

    Make-Table query using VBA

    Would I have to live with the prompt or is there a way round it? Thanks for all inputs
  8. M

    Make-Table query using VBA

    Okay, now its working using an OpenQuery method but there is a slight problem when I pass a parameter from a text field in a form to the query - although the module works but it gives a prompt saying "You didn't specify search criteria with a FindRecord Action". and I have to press OK to that...
  9. M

    Make-Table query using VBA

    Thanks for that Alan. On somebody else's advice I've used this: Sub Trial() DoCmd.SetWarnings False CurrentDb.Execute "qry_create_table_cable ", dbFailOnError DoCmd.CopyObject , "tbl_CABLE_" & Format(DATE, "dd/mm/yy"), acTable, "tbl_CABLE" DoCmd.SetWarnings True End Sub It works...
  10. M

    Make-Table query using VBA

    Hi, I'm trying to run a make-table query using VBA such that each time the code is executed, two tables are formed, one with a fixed table name "tbl_CABLE" and the other table having the system date suffixed to its name i.e. tbl_CABLE_13/01/2009 for instance. I've designed a make-table query...
  11. M

    How to insert a number with eight or more digits in standard format?

    Guys.....it works now :) My table field was set to type Text and I had to change that to Number. Although the variable DWG_ID_ads was evaluated in exponential but when inserted in the table, it took the standard format. Cheers!
  12. M

    How to insert a number with eight or more digits in standard format?

    Just to add to the code to give a better picture: --------------------------------------------------------------- AUTO_NO_ads = Me.list_LOOPS_AVAIL_ads.Column(1, varItm_ads) DWG_ID_ads = Val(1000000 * Me.cbo_SHT_ads) + AUTO_NO_ads + 10000000 rst_ADD_SHT_ads.Open "tbl_LOOPGEN_shts"...
  13. M

    How to insert a number with eight or more digits in standard format?

    I have a VBA code which picks values from a form, performs calculations on them and then inserts them into a text field in a table. part of the code is: AUTO_NO_ads = Me.list_LOOPS_AVAIL_ads.Column(1, varItm_ads) DWG_ID_ads = Val(1000000 * Me.cbo_SHT_ads) + AUTO_NO_ads + 10000000 The...
  14. M

    updating text field with numeric value?

    works a treat now........cheers!
  15. M

    updating text field with numeric value?

    Guys Unfortunately neither work............ David could you retype it pls......I was actually trying this: Val(1000000*[tbl_LOOPGEN_shts]![SHT]) + [ tbl_LOOPGEN_shts]![Auto_No] the first part of the Val() expression is evaluated but it doesn't add up with the numeric field.....says a...
  16. M

    updating text field with numeric value?

    I have a text field Dwg_Id in a table which I'm trying to update to a number using: Val(1000000*[tbl_LOOPGEN_shts]![SHT]) + [ tbl_LOOPGEN_shts]![Auto_No]) but it's not letting me do that. Please note SHT is also a text field and Auto_No is AutoNumber. If I only update the field to...
  17. M

    conditional query?

    Hi all, I have a Select query as: SELECT (qry_1!SET_NO*qry_2![now]-qry_2![now]+1) AS JBOXT FROM qry_LOOPGEN I want an exception to the usual return as above, If there is a field Tag_Number in qry_LOOPGEN, can I modify the above query to say IF Tag_Number=XYZ, THEN JBOXT=ABC ( that is...
  18. M

    Running a batch file from command prompt using VBA

    Hi, I know this can be done but I'm a novice at VBA. I have a batch file AutoLoop.bat which I run from command prompt at the moment. The idea is to run a VBA routine behind the onClick event of a command button in Access which would run this batch file in command prompt automatically. Say if...
  19. M

    VBA help:Exporting Column Names with Data from one table to another

    Thanks a lot chergh. Your code is indeed efficient and easy to comprehend for a novice like me. A few questions more: 1) In the text file instead of the hyphen "-", i just need the fields separated by variable length spaces. I replaced the hyphen with a string " " with spaces and it's...
  20. M

    VBA help:Exporting Column Names with Data from one table to another

    I eventually want to export the Tbl_Output data into a text file that will be used further ahead. So it might be possible to export it from Tbl_People directly into a text file with the required formatting as Tbl_Output. Whatever is more convenient?
Top Bottom