if-then statement in vba
Private Sub savebutton_Click()
Me.savedtext.Visible = True
How can I make an (if-then) statement that says that if any further changes are made to the info (pulling from table restaurantinfo) on the form, then Me.savedtext.Visible = False ?
Thank you for taking the time to report an issue.
What's wrong... Please write below.
If you've done it, you know how messy it is sorting out the quotes, and the line endings.
Learn how to build a form that massages the SQL statement from a query, so it can be pasted into a VBA procedure in Microsoft Access.
This example will use the SQL statement to create an Access query, but you can use the statement in a macro or VBA as well.
Is it best to check before the query is run in the VBA, or in the SQL statement it's self to avoid this problem better?
I'm not sure how I even would check the table with SQL.
How can I make an (if-then) statement that says that if any further changes are made to the info (pulling from table restaurantinfo) on the form, then Me.savedtext.Visible = False?
I created a button with the following vba action statement
Private Sub Refreshtxttrig_Click()
DoCmd.RunSQL "drop table [Table Name]"
(This statement deletes a specific table within access.)
It works well, except when the Table is missing or I accidently click twice, it executes the statement but brings up a "runtime error." instead.
I would like to create a statement that will bring up a MsgBox instead of a runtime error and tells the user that the Table has already been purged
The VBA code creates a new table with an identical name, while a manual import properly appends the existing table.
Can VBA be used to append an existing table with a TransferText statement