Search results

  1. K

    how do i link a table?

    I've written the following to produce a table in a new database. Now I need to do things with it eg. create indexes. How do I link the table to my current database using vba codes? (i want this done immediately and automatically after the table is created in the other database) Many thanks if...
  2. K

    How do I create a table in new database?

    it worked very well thank you very much! but i now have to deal with the next problem... how can i do things with the newly created table? do i link it first? then do everything in the same way?
  3. K

    cut and paste table?!?!

    I want access to automatically cut and paste (or copy and paste then delete) a table into a new database when i click on a button. how do i do it? thanks!
  4. K

    How do I create a table in new database?

    Dim Sqlstr1, Sqlstr2 As String Sqlstr1 = "create table Fbal;" Sqlstr2 = "SELECT IL4010DF.* INTO Fbal FROM IL4010DF ORDER BY IL4010DF.Pnumber;" DoCmd.RunSQL Sqlstr1 DoCmd.RunSQL Sqlstr2 CurrentDb.TableDefs.Delete "IL4010DF" Call CreatePKIndexes("Fbal", "Pnumber"...
  5. K

    How do I open a linked table?

    Hi, Thank you. But what do u mean by change the file name? my files to be opened are "Rid" and "Pol" The problem i have is it says "Invalid operation" when i run the code, and it highlights the line Set rst_p = db.OpenRecordset("Pol", dbOpenTable). i dont know what has gone wrong...=(
  6. K

    How do I click on a button in one database, then create a table in another database?

    my main problem is: i dont know how to create the table in a new database ><
  7. K

    How do I open a linked table?

    If a table is imported into the database, we write: Dim rst_p, rst_r As DAO.Recordset Set db = CurrentDb Set rst_p = db.OpenRecordset("Pol", dbOpenTable) Set rst_r = db.OpenRecordset("Rid", dbOpenTable) But if the tables are linked instead, what code should i write to open it...
  8. K

    How do I click on a button in one database, then create a table in another database?

    I am going to link the table to the original database, but I what I dont know how to do is: Click on a button in database1, then have the table created in database 2. I need to do that because the form is going to be used by some other user, so i need to keep the procedure for them as easy as...
  9. K

    How do I click on a button in one database, then create a table in another database?

    Hello! I have some codes that will import a table fro text file, then fill in null cells with some appropriate values. It will become so big that I need to separate this table from the others in another database and then link it. How do I click on a button on a form in one database, then...
  10. K

    How do i delete all the records in a table but retaining the structure?

    Please Help! Thank you so much! =)
  11. K

    How do I delete a record?

    I need to append a number of records into an existing table of records. I would like it to delete the existing record when on error. What code should I write to delete a record?
  12. K

    How do I append a field?

    If I say I have run this code before, would it be the reason that the fields already exist and cannot be overwritten? If i only need them to exist (i dont need them to be deleted and created again each time because i only need the same fields each time i run it), does it mean that I can just...
  13. K

    How do I append a field?

    i wrote this code. it runs fine until the last light where a msg box says "cannot define field more than once". Have i typed in some wrong code? Dim rst As DAO.Recordset Dim tbl As DAO.TableDef Dim db As DAO.Database Dim fld As DAO.Field Set db = CurrentDb Set tbl = db.TableDefs("Pol")...
  14. K

    =( why is this Data Mismatch?????

    i changed the both expressions but...this time...it says..."you tired to execute a query that does not include the specified expression 'Dur1' as part of an aggregate function" why is this happening????
  15. K

    what does this mean?

    The SQL is ridiculously long and messy.... it is as follows: SELECT Rid.Dur1, Rid.Code, Sum(1*IIf([Rid].[layer]=0 And [Rid].[code]=[Rid].[rcode] And ([rid].[status]="I" Or ([rid].[status]="P" And (Not IsEmpty([Rid].[edate])))),1,0)) AS nopol, Sum([rid].[bsa]*1*IIf([Rid].[code]=[Rid].[rcode]...
  16. K

    what does this mean?

    when i want to run a query it says "you tired to execute a query that does not include the specified expression 'Dur1' as part of an aggregate function" what does this mean? Dur1 is in the table and it has got valid values...i dont understand what has gone wrong..=.=
  17. K

    how do i look up the value of cell using access?

    Thank you very much it worked!! and its simple!!
  18. K

    =( why is this Data Mismatch?????

    =( what is wrong with this... when i run the query it says "data type mismatch in criteria expression"... Field aprid: Sum(([prem]+[eprem_o]+[eprem_m])*1*IIf((Not ([code]=[rcode]) And Not ([rcode]=("TOPUP" Or "FSB" Or "FSSB" Or "MKB"))) And ([status]="I" Or ([status]="P" And Not...
  19. K

    How do i sum up all values in a field given some criteria?

    Thank you so much i get it now!!! but if i want this to be done automatically when i click on a button on a form, how do i do it?
  20. K

    How do i sum up all values in a field given some criteria?

    Sorry =P let me rephrase this. I have a table1 in access db that has several columns and many rows. I need to produce another table2 using the data in this table1. I need to sum up all the cell values of a column "cost" in table1 -> to make one new value. This value, i need it to appear...
Back
Top Bottom