Search results

  1. W

    VB Error, Expected: end of statement.

    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...
  2. W

    Can anyone tell me what is wrong with this please? (Expected: end of statement)

    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?
  3. W

    Two prefixs in a text box, get next number for each prefix?

    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.
  4. W

    Two prefixs in a text box, get next number for each prefix?

    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...
  5. W

    WIll this code autofill a textbox from table value with three 'WHERE's?

    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!!
  6. W

    Prefix Text box based on combobox selection

    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...
  7. W

    Taking data from one table to another and then summing?

    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.
  8. W

    Taking data from one table to another and then summing?

    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...
  9. W

    WIll this code autofill a textbox from table value with three 'WHERE's?

    I actually used rowSource because I dont know what to use for a textbox:o.
  10. W

    Taking data from one table to another and then summing?

    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...
  11. W

    WIll this code autofill a textbox from table value with three 'WHERE's?

    Private Sub cboC_AfterUpdate() On Error Resume Next txtW.RowSource = "Select tblCables.W " & _ "FROM tblCables " & _ "WHERE tblCables.T = '" & cboT.Value & "' And tblCables.C = '" & cboC.Value & "' And tblCables.N = '" & cboNCA.Value & "' " & _ End Sub I have...
  12. W

    On click textbox inserts value back on combobox

    Superb, thank you!
  13. W

    Make data input into form from comboboxes, text boxes etc write to table

    I made a total mess of my reply. I had edited, can you please re-read and respond. Thank you very much for your time!
  14. W

    Make data input into form from comboboxes, text boxes etc write to table

    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...
  15. W

    Make data input into form from comboboxes, text boxes etc write to table

    Hi all, I have a form made now and a table created which I want the form to write to. Is there a way I can make the form write data to this specific table and specific field? E.g. I have put cascading comboboxes in and I want the info selected from these, from other table to be entered into...
  16. W

    On click textbox inserts value back on combobox

    Hi all, Thanks for your help so far my database is moving along nicely. I have something I want to add though and this is that on click in a text box the text box will look at another value in a combobox and based on that value with insert a specific letter. E.g. If cboT.Value =...
  17. W

    Cascading Combobox based on TWO "WHEREs?

    No I needed to remove the second where. Thanks for the input everyone!
  18. W

    Form to write record to specific table based upon a value?

    Is there a way to get a form to write a record to a specific table based upon a value? Ideally this value would be True/False ie a check box or via a selection. I have one form to input data but I want the record to be written to one of 5 fields based upon a value. Thank you in advance...
  19. W

    Cascading Combobox based on TWO "WHEREs?

    Thats great thanks, Ill take aboard the mentioned Numeric IDs.
Back
Top Bottom