I want my form to look up a columns value and if the column is empty insert a character(example: "n"). I've tried to alter the table with a sql statement but that doesn't seem to be working. I know this should be fairly simple but I'm not having any luck.
Thanks so much
I have the following code that sorts the table in ascending order by MakeName, ModelName, and VIN
rst.Open "Select * From " & tnm & " Order By MakeName, ModelName, VIN", CurrentProject.Connection, adOpenStatic, adCmdText
'tnm is my table name
I want to now add two more...
These aren't traditional line breaks. If you go to file/get external data/import/ select a text file
then select fixed width and next
you will see how the line breaks are actually created. They are really fields breaks so I miss lead you with the terms that I used.
I've added the following code to one of my access forms:
Dim tnm As String
'Get the table name
tnm = [Forms]![Form1]!Text0.Value
If Not CurrentDb(tnm) Then
MsgBox "This table already exists in the Database."
DoCmd.RunSQL "DELETE * FROM " &...
Here is the statement that is creating my table:
DoCmd.TransferText acImportFixed, "Price Symbol Import Specification", Forms!Form1!Text0, Forms!Form1!Text2, False, ""
The "Price Symbol Import Specification" was created when I manually imported one of the txt...
I have a form that is creating a table and I want to check and make sure the table name that is entered into [Form]![Form1]![Text0] is in the database. If the table already exists I want to delete it because otherwise the new data that I am importing gets added to the current table. So basically...
Thanks Bob for all the help.
I figured out how to add the column and everything is working very good.
DoCmd.RunSQL "ALTER TABLE " & tnm & " ADD COLUMN MakeName TEXT"
Another question a little different, is it possible to not have the alert box come up telling you...
This statement puts the correct values into the Update_MakeAbbr!
DoCmd.RunSQL "UPDATE " & tnm & " AS A INNER JOIN Makes AS B ON A.MakeAbbr=B.MakeAbbr SET A.Update_MakeAbbr = B.MakeName"
However this statement is not changing the value of A.MakeAbbr
DoCmd.RunSQL...
When I DoCmd.RunSQL strSQL am I supposed to be able to see the results in the update in the [Forms]![Form1]!Text0.Value
table? I get a message back that it's updating 2775 records out of the 3303, so it must be doing something but I can't tell. I trying to the the value of MakeAbbr and it's not...
When I use this code I do not get an error, but it doesn't appear that the MakeName is the tnm table. I really need to get the MakeName somewhere into the tnm table either in it's own column or replace the MakeAbbr if the tnm.MakeAbbr = Makes.MakeAbbr.
Hopefully I've this is clear to understand...
When I use this code I do not get an error, but it doesn't appear that the MakeName is the tnm table. I really need to get the MakeName somewhere into the tnm table either in it's own column or replace the MakeAbbr if the tnm.MakeAbbr = Makes.MakeAbbr.
Hopefully I've this is clear to understand...
When I use this code I do not get an error, but it doesn't appear that the MakeName is the tnm table. I really need to get the MakeName somewhere into the tnm table either in it's own column or replace the MakeAbbr if the tnm.MakeAbbr = Makes.MakeAbbr.
Hopefully I've this is clear to understand...
When I use this code I do not get an error, but it doesn't appear that the MakeName is the tnm table. I really need to get the MakeName somewhere into the tnm table either in it's own column or replace the MakeAbbr if the tnm.MakeAbbr = Makes.MakeAbbr.
Hopefully I've this is clear to understand...
When I use this code I do not get an error, but it doesn't appear that the MakeName is the tnm table. I really need to get the MakeName somewhere into the tnm table either in it's own column or replace the MakeAbbr if the tnm.MakeAbbr = Makes.MakeAbbr.
Hopefully I've this is clear to understand...
OK, here's the code that I am trying to use:
Dim strSQL as String
Dim tnm as String
'Get the table name that I am creating in a form
tnm = Text0.Value
'I am adding another column to my trm table that is generated from my Makes table.
strSQL = "UPDATE " & tnm & " INNER JOIN...
When I try this code, I'm getting a syntax error(missing operator) in query '2002.MakeAbbr = MAKES.MakeAbbr'.
2002 was the table that I created or that was in tnm.
Any suggestion to get this debugged.
I have:
-one Access table called Makes containing two columns MakeAbbr and MakeName. Example: MakeAbbr=Chev and MakeName=Chevolet
-one table created from a form, where user enters the table name in to [Text0] and in [Text2] the text file to be imported. The user then clicks on the Create Table...
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.