Search results

  1. cheekybuddha

    show name in a combo box but store id

    Looks like the BE is MySQL.
  2. cheekybuddha

    New Access / SQL backend bug - #Deleted showing in Tables

    Yay, go Access! 😖
  3. cheekybuddha

    Solved Move comma separated data in a field to rows

    Trim(), LTrim(), RTrim()
  4. cheekybuddha

    Navigation Buttons

    My guess is that you do not have Option Explicit declared at the top of every code module, and you have somewhere declared another variable named recordset (lowercase)
  5. cheekybuddha

    Solved Move comma separated data in a field to rows

    Perhaps safer to: ' ... GenreList = Split(!DelimitedEmployees, ",") ' Split on the comma only For x = LBound(GenreList) To UBound(GenreList) rs_out.AddNew rs_out!EmpConvertDelimited = Trim(GenreList(x)) ' Trim any preceding/trailing...
  6. cheekybuddha

    Navigation Buttons

    Put something like this in your form's Current event: Private Sub Form_Current() With Me If .Recordset.BOF Or .Recordset.EOF Then ' Set focus to another control to avoid error disabling a control that has focus .txtXofY.SetFocus End If .cmdPrev.Enabled = Not...
  7. cheekybuddha

    Access - counting scanned records

    Why are you looping at all? First, you need a module level variable to store the count. Then, your AfterUpdate event increments it Your reset button click event will set it to 0 again Option Explicit Option Compare Database Private m_iCount As Integer ' Defaults to 0 Private Sub Private...
  8. cheekybuddha

    Data Prefix show error if not correct

    Yet another construct: Dim PkgID as String ... PkgID = Left(Me.PackageID, 1) Select Case PkgID Case "S", "M", "G" 'do nothing Case Else Me.PackageID = Null Cancel = TRUE MsgBox "Entered data is not valid for this field." End Select ...
  9. cheekybuddha

    Referencing subform 2

    First, which form's code module are you running the code from? Second, beware that you must refer to the subform control which, depending on how you added the subform, may be named differently (eg: 'Child0') from the form it uses as its SourceObject. To find the name of the subform control...
  10. cheekybuddha

    Solved current db execute - update table error 3078

    Going solely on the SQL and not considering whether what you are attempting is a valid operation, try: Private Sub btnUpdate_Click() Dim DetailsID As Integer, strSQL As String DetailsID = Me.ID_ArticleDetails strSQL = "UPDATE MainOrdersEntries SET ID_Article = " & Me.ID_Article & "...
  11. cheekybuddha

    DLookUp - Syntax

    The problem still exists with your solution - Me.Well_ID is not valid when the DLookup() is used in a fom control's ControlSource expression. You just need to use [Well_ID] on its own. Of course, when you use the DLookup() in VBA then Me is valid within the context of the form's Class module.
  12. cheekybuddha

    Merge 2 codes

    Try it like this: Private Sub Form_Current() Dim blVisible As Boolean With Me blVisible = .OpenCSOrdersFromMenuRegistration.Form.RecordCount = 0 AND IsNull(.Registration) .OpenCSOrdersFromMenuRegistration.Visible = blVisible .StatusBtn.Visible = blVisible End With End Sub
  13. cheekybuddha

    Merge 2 codes

    What is OpenCSOrdersFromMenuRegistration ? A subform of StatusRegFilter subform ?
  14. cheekybuddha

    Merge 2 codes

    It looks like Me.StatusBtn is on the subform. Which form are you running this code from? The main form's Current event? The subform's Current event? Describe your forms/subforms. Is [StatusRegFilter] also a subform?
  15. cheekybuddha

    DLookUp - Syntax

    I always thought that form control expressions had no concept of Me. Happy to be wrong about that though.
  16. cheekybuddha

    DLookUp - Syntax

    You haven't put the quotes round the field name and table name. =DLookUp("APN","Access_Agreement","Well_ID = '" & [Well_ID] & "'")
  17. cheekybuddha

    DLookUp - Syntax

    :coffee:
  18. cheekybuddha

    DLookUp - Syntax

    =DLookUp("APN","Access_Agreement","Well_ID = '" & [Well_ID] & "'")
  19. cheekybuddha

    DLookUp - Syntax

    Probably cos you made a typo! :ROFLMAO: I think you meant '... can't use ...'
Top Bottom