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.
If cg_p_chk.Value = vbChecked Then
frm_payment_rece = 1
Else
frm_payment_rece = 0
End If
Dim frm_payment As Integer
'check the check box state and store its position in variable frm_payment_chk
If cg_p_chk.Value = vbChecked Then
frm_payment_rece = 1
Else
frm_payment_rece = 0
End If
DoCmd.RunSQL "INSERT INTO CRID_index ([CRID], [CRID_num], [server_ip], [server_port], [payment], [validation_period], [start_date], [exp_date])" & _
"VALUES ('" & frm_CRID &"', '" & frm_num_chop & "', '" & frm_serv_ip & "', '" & frm_serv_port & "', '" & frm_Uprice & "', '" & frm_validation & "', '" & frm_start & "', '" & frm_exp & "');"
If Me.CheckboxName Then
frm_payment_chk = 1
Else
frm_payment_chk = 0
End If
If Me.CheckboxName Then
frm_payment_chk = 1
Else
frm_payment_chk = 0
End If
Private Sub Chop_it_Click()
Dim Vtemp As Integer
Dim x As Integer
Vtemp = 0
x = 0
'Here first we check whether or not if any record exists in the table
If CurrentDb.OpenRecordset("SELECT COUNT(CRID_index.CRID_num) FROM CRID_index")(0) > 0 Then
Vtemp = CurrentDb.OpenRecordset("SELECT MAX(CRID_index.CRID_num) FROM CRID_index WHERE CRID_index.CRID = '" & cg_txtCRID & "' ")(0)
Else
Vtemp = 0
End If
MsgBox Vtemp
'check the check box state and assign the value
If cg_p_chk.Value = vbChecked Then
cg_p_chk = 1
Else
cg_p_chk = 0
End If
'get the cg_chp_num value for the number of record entries
Do While x < cg_chp_num
x = x + 1
'increment the Vtemp field value
Vtemp = Vtemp + 1
'fals for all worning while inseting the records
DoCmd.SetWarnings fals
'basic SQL statement for the table CRID_index
DoCmd.RunSQL "INSERT INTO CRID_index ([CRID], [CRID_num], [server_ip], [server_port], [payment], [payment_rece_chk], [validation_period], [start_date], [exp_date])" & _
"VALUES ('" & cg_txtCRID & "', '" & Vtemp & "' , '" & cg_txtservIP & "', '" & cg_serv_port & "', '" & cg_unit_price & "', '" & cg_p_chk & "', '" & cg_validation & "', '" & cg_start & "', '" & cg_exp & "');"
Loop
MsgBox "All valuable records are successfully inserted into the database."
End Sub