Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Button_Click()
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM company_details")
rst.AddNew
rst!NameCoDet = txtNameCoDet
rst!Business_Description = txtBusiness_Description
rst!RIC = txtRIC
rst!Datastream_Code = txtDatastream_Code
rst!Blomberg_Ticker = txtBlomberg_Ticker
rst!Sector = txtSector
rst!Earnings_Release_1 = txtEarnings_Release_1
rst!Earnings_Release_2 = txtEarnings_Release_2
rst!Earnings_Release_3 = txtEarnings_Release_3
rst!Web_address = txtWeb_address
rst.Update
rst.Close
End Sub
As for the necessity of having valid data in the NameCoDet control then have the form open with then button's enabled property set to false.
Then in the txtNameCoDet control's AfterUpdate procedure put
Private Sub txtNameCoDet_AfterUpdate()
If IsNull(txtNameCoDet) Then
Button.Enabled = False
Else
Button.Enabled = True
End If
End Sub
QED.
G LS