Private Sub Form_Load()
Dim strFormName As String
strFormName = Environ("USERNAME") & "_Buyback_Template_t"
MsgBox strFormName
'Me.RecordSource = "name_Buyback_template_t"
CurrentDb.TableDef.SourceTableName = "name_Buyback_template_t"
End Sub
throws a method not found.
I tested the variable it is good.
I even tried setting it to a table name just to test my sanity. Turns out that this failed as well.
In answer to the other question I am doing this for "business reasons" in other words 1) there is a long story and I don't think anyone wants to really here it...
I have a form and subform linked and need to change the form and subform record source on open.
Everywhere I look I see that this should work. I placed the below code in both the form and subform open sub.
Private Sub Form_Open(Cancel As Integer)
Me.RecordSource = Environ("USERNAME") +...
Say I want to have a query create a table named based upon the current date and time. So
Parameter @newtable = date()
select into @newtable from tblData
Is there any way to write a query that will generate a table with a random name WITHOUT using VBA.
Using access 97 but soon access 2007.
I know I can do this with VBA but have been tasked with doing it without VBA.
Why: it's a job I get paid and I've had the fight and lost. If I can't...