Private Sub txtCN_Click()
Dim sPrefix As String
Dim Mysql As String
Dim sKey As String
Dim sSuffix As Integer
Dim X As Integer
Dim conn As New Adodb.Connections
Dim rs As New Adodb.Recordset
I get the error highlighted at Dim conn As New Adodb.Connections
The error I get is
Compile...
Mysql = "SELECT Max(CDbl(Mid([YouFieldName]," & X & "))) AS NewNum"
FROM tbl_YourTblName Where YourFieldName Like '" & sPrefix & "*'"
I get the error highlighted at Where
The error I get is
Compile error:
Expected: end of statement.
Can anyone help please?
Thank you very much for the reply.
This was going to be my unique field, however I will have two 0001's. One for P and one for C, so I don't think that method would be appropriate.
Hi all,
I have a text box which is partly filled by the code
Private Sub cboSeg_AfterUpdate()
If Not IsNull(Me.CBOsEG) Then
If Me.CBOsEG = "C&I" Then
Me.txtCN = "C-"
Else
Me.txtCN = "P-"
End If
Else
Me.txtCN = ""
End If
End Sub
However what I want to do now...
Thank you for the reply it almost makes sense to me haha.
Can you just show me how I would combine three whres and a dlookup with my combobox afterupdate.
Thank you!!
SOLVED: Prefix Text box based on combobox selection
Hi all,
I want to add a prefix to a text box based upon a selection from a combobox.
Specifically,
if cboSeg = C&I txtCN prefixed 'C'
if anything else prefixd 'P' and if nothing, no prefix.
Can someone help me with this please...
No, ZE has no weight. ZE is simply a catagory of equipment it is the equipment in that catagory that has the weight.
So location a has ZE equipment 1 and 3
but at location B there is ZE equipment 1,4,7.
Each piece of equipment has its own weight and size.
The equipment is split up into types (seg. types) e.g. ZE etc etc and the equipmet is grouped as per the seg types.
What I want to do it calulate the we of the groups at each location e.g. all ZE equipment and location a, all equipment b at...
Hi all,
I have a form which is allowing input of equipmet info. To keep is simple I have tried to dumb it down as much as possible. Here is an example of the table with some data in.
Now my aim is to be able to have a table which creates a unique record for every combination of location...
The form itself is bound, however i designed the form, with cascading comboboxes etc which are unbound and there is only one field in the form which is bound to the table I want my data input into.
My comboboxes and text boxes have some vb associated which gets data from another table, however...