Hi,
I was wondering if anyone could help me out…up until 3 weeks ago I had never created a database on Access so I am VERY new to this but now I find myself writing queries, macros and even some VBA code! I am a complete novice so I apologise if this is ridiculously easy but I just can’t work it out from MS Access 2010 help and Microsoft online training and I have no one I know that could help.
I have created a Supplier Cost Database, within this I have a Table (Costs) and a Form (Cost Database) based on the Costs table. On the table and form there is a free type field called Second Tier Supplier Name and a Yes/No Checkbox called Corporate Rate.
I have another table in the database called CorporateRates.
I am trying to write the VBA code so that when a Supplier name has been entered in the Second Tier Supplier Name field the database will automatically check if this name is listed in the Corporate Rate Table (field would be Hotel) and auto ticks the check box if it is.
I am completely stumped and would be eternally grateful for anyone that can give me any pointers!
This is what I have so far….please don’t laugh at my pathetic attempt I did say I was very new to all this !
Private Sub Second_Tier_Supplier_Name_AfterUpdate()
Corporate_Rate = "1"
"WHERE Second_Tier_Supplier_Name = '" & tblCorporateRates Hotel & "' " & _
Many thanks!
I was wondering if anyone could help me out…up until 3 weeks ago I had never created a database on Access so I am VERY new to this but now I find myself writing queries, macros and even some VBA code! I am a complete novice so I apologise if this is ridiculously easy but I just can’t work it out from MS Access 2010 help and Microsoft online training and I have no one I know that could help.
I have created a Supplier Cost Database, within this I have a Table (Costs) and a Form (Cost Database) based on the Costs table. On the table and form there is a free type field called Second Tier Supplier Name and a Yes/No Checkbox called Corporate Rate.
I have another table in the database called CorporateRates.
I am trying to write the VBA code so that when a Supplier name has been entered in the Second Tier Supplier Name field the database will automatically check if this name is listed in the Corporate Rate Table (field would be Hotel) and auto ticks the check box if it is.
I am completely stumped and would be eternally grateful for anyone that can give me any pointers!
This is what I have so far….please don’t laugh at my pathetic attempt I did say I was very new to all this !
Private Sub Second_Tier_Supplier_Name_AfterUpdate()
Corporate_Rate = "1"
"WHERE Second_Tier_Supplier_Name = '" & tblCorporateRates Hotel & "' " & _
Many thanks!