Got it working!
Function ChangeFieldName()
Dim rs As Recordset
Dim rs1 As DAO.TableDef
Dim db As DAO.Database
Dim Tabname As String
Dim FLD As Field
Dim i As Integer
Set db = CurrentDb
Set rs = db.OpenRecordset("listTables")
If Not rs.BOF And Not rs.EOF Then
rs.MoveFirst
End If
Do While Not...
Here is as far as I have gotten:
Function ChangeFieldName()
Dim rs As Recordset
Dim rs1 As Recordset
Dim db As DAO.Database
Dim Tabname As String
Set db = CurrentDb
Set rs = db.OpenRecordset("listTables")
If Not rs.BOF And Not rs.EOF Then
rs.MoveFirst
End If
Do While Not rs.EOF
Tabname =...
OK, I don't see a way to make changes in queries other than manually, replace doesn't seem to work in design view. I have code in place to give me a list of tables and loop through the list. Now I need to be able to pull a second list of field names in each table, check to see if the name of one...
Well, I do this now. Go to your main printer folder and open the properties of the Adobe printer. Here you can set it to not prompt fo the file name and I believe on the port tab you can set the directory it prints to. You have to set these things here, they don't stick if you try it on the fly...
Is there some way to do a global "search and replace" in Access 2003. I have several tables and lots of queries that utilize the field name "MID". I don't relish the idea of going through 700 tabkes and 275 queries and a bunch of vba code to hand change every instance. I would like to change all...
Thanks, I got that to work like this:
Function AddTable()
Dim rs As Recordset
Dim db As DAO.Database
Dim Tabname As String
Set db = CurrentDb
Set rs = db.OpenRecordset("listTables")
If Not rs.BOF And Not rs.EOF Then
rs.MoveFirst
End If
Do While Not rs.EOF
On Error Resume Next
Tabname =...
I am trying to find a way to add a field to every table in my db. I get data every month in the same tables with the same fields. I would like to combine the data into a single database but I will still need to be able to pull say quarterly and YTD reports. Some tables have datetime fields but...
I am trying to further automate a bunch of reporting. One of the things I am trying to revise is hand pulling data in Excel into different formats and then importing into Access. I have the main data coming in now straight from the .txt file and some trimming and updating of data. Now I am...
I found a quick and dirty method recommended by a user on a SBS group I participate in, in QA run this:
Select * into "Newtable" From "OldTable" Where 1=0
This will create an empty table with all your existing fields. It will not create constraints and such. You can then add the extra column you...
Note that my filter is set on a textbox on the report, not a table, even thought the table field does exist. Try putting a textbox on the report and changing your filter to that, have the text box use the table field as a data source. You can make the box not visible if you don't want it to...
Great, I was playing around trying to add a new column and now my table is empty! At least it is not one of the big ones, but it's gonna be two days rebuilding it anyway since all the original data is on encrypted cd's. I don't suppose there is a way to undo this? I just got this put together...
I have several tables I imported from Access 97 to SQL 2000. I am trying to set up relationships so Reporting services can do it's wonderful drill down thing, but I get the error "Primary Key or UNIQUE constraint must be defined for table 'ACH_LogMth' before it can participate in a...
I am importing a bunch of data from Access to SQL 2000. I have a table that gives me an error when I try to import it. "Could not allocate space in database "dbname" The PRIMARY Filegroup is Full. I have the db set to autogrow and I have 64 gb of free space on the drive. The only thing I can...
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.