[code]
' The following lines move a field to the Leftmost part of the table if it is in the last column.
cols = tbl2.Fields.Count
p = tbl2.Fields(cols - 1).Name
tbl2.Fields(0).OrdinalPosition = 1 ' This line may not be necessary
tbl2.Fields(cols - 1).OrdinalPosition = 0...
Hello all, I was wondering if I was to make a query def with this SQL statement, how would I do it correctly?
SELECT * FROM sampletable WHERE (SELECT FORMAT([Rows],0000) FROM sampletable) < 800
I would like to format the 'rows' column as all numbers but it is currently a text column and too...
AccessGuruCarl,
Is there a way to do that with a table? I just pasted the examples in msdn for the Column Order property. I should've typed:
Tables!CurrentTable!ColumnSpec.ColumnOrder = 1
If there is a way to do this, how or where in the code should this statement be put in?
In my last post I was looking for a way to set an autonumber field for new tables automatically in code. Now I need to find a way to move the column from the last in line to the first in code, and I haven't had much luck getting this to work yet. I've been trying something like...
PHV, you've done it again!! So many times you've helped me. Thanks. One last thing, is it possible to move the column to be the first in the table because it shows up last in the table after being added on by the sql.
I forgot to add that I'm using Access 2000 and I know its easy to create an autonumber field but I was hoping that you can set one up while appending fields to a tabledef
I have VBA code that makes a Tabledef if its name doesn't already exist in the database and adds it to my other tables, but I wish to set its ID field to Autonumber (Long). Any ideas as to how to do this?
Thanks
I forgot to mention, I have been trying this by creating the fields, appending the tabledef, then opening the recordset by the same name. The recordset always has trouble with setting index
Hello. I have been trying for the longest time to set up a table of computer folder pathways like "C:\Tmp\bin" and other data columns using TableDef and CreateField lines. That part now works fine but I would like to take this new table and index a field so I can use the Seek function to find if...
I have been trying to find a way to list the records in my recordset that are being deleted when it updates and also list the records that are added new. I wanted to just put in a couple of lines of code so when the file is deleted or added new, the program would record it and output a log. Does...
Is there a way to take a select query and make it into a possibly column-justified text file (.txt)? I haven't been able to find any instances of outputting text so any help is quite appreciated. Thank you
Thanks for your input. I did find a different way to do it from a MSDN article on Query By Form method and using QueryDef objects. I could possibly use your method in the future though. Thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.