chrisjames25
Registered User.
- Local time
- Today, 23:23
- Joined
- Dec 1, 2014
- Messages
- 404
HI. I have a userform that when it opens all looks good and all my labels on form are not bold.
I enter a batch number at the topand then click a command button to pull in the data to the form relating to the batch number. On clicking this command button numerous of my controls labels turn bold for no explained reason.
PLease see attached images showing the change.
Th
The only code in the command button is as follows:
I cant see how this could effect labels in the form. Is this a bug. I could do a workaround of tall all labels to bold = false but would rather try to understand why this is occurring.
Thanks in advance
I enter a batch number at the topand then click a command button to pull in the data to the form relating to the batch number. On clicking this command button numerous of my controls labels turn bold for no explained reason.
PLease see attached images showing the change.
Th
The only code in the command button is as follows:
Code:
Private Sub Cmd_EnterPottingData_Click()
Dim msg As String
Dim style As String
Dim title As String
Dim response As String
Dim mystring As String
Dim field As String
Dim Source As String
Dim criteria As String
field = "BatchNo"
Source = "Tbl_PottingData"
If Len(Me.Txt_BatchNo.Value & vbNullString) = 0 Then
Exit Sub
Else
criteria = field & "= " & Me.Txt_BatchNo
End If
'##############################################
' TEST VALID BATCH NO.
'##############################################
If DCount(field, Source, criteria) = 0 Then
msg = "This batch number does not exist within the database"
style = vbOKOnly + vbExclamation
title = "Batch No. Input Error"
response = MsgBox(msg, style, title)
Me.Txt_BatchNo.Value = "XXXX"
Me.Txt_BatchNo.SetFocus
Exit Sub
End If
'################################################
' If VALID populate sheet
Me.Form.Requery
Me.Cbo_Category = Me.Bound_Category
Me.Cbo_Variety = Me.Bound_Variety
Me.Cbo_Genus.Requery
Me.Cbo_Genus = Me.Bound_Genus
Me.Cbo_Customer = Me.Bound_Customer
Me.Cbo_Supplier = Me.Bound_Supplier
Me.Cbo_Potsize.Requery
Me.Cbo_Potsize = Me.Bound_PotsizeID
Me.Cbo_Compost = Me.Bound_CompostID
Me.Cbo_Nursery = Me.Bound_NurseryID
Me.Cbo_Greenhouse.Requery
Me.Cbo_Greenhouse = Me.Bound_GreenhouseID
Me.Txt_QtySupplied = Me.Bound_QtySupplied
Me.Txt_QtyPerPot = Me.Bound_QtyPerPot
Me.Txt_TotalOutput = Me.Bound_Output
Me.Txt_SupplierNo = Me.Bound_SupplierNo
Me.Lbl_Plug.FontBold = False
'Me.Cbo_Category.SetFocus
Me.Txt_QtyPotted.SetFocus
'UnlockData
'Me.Form.Requery
End Sub
I cant see how this could effect labels in the form. Is this a bug. I could do a workaround of tall all labels to bold = false but would rather try to understand why this is occurring.
Thanks in advance