Search results

  1. W

    DLookup code not working in VBA

    Mir, If 'Orders Not Received' is a constant, then: ElseIf DLookup("[BinNumber]", "tblGoingOut", "[Status]='Orders Not Received'") > 0 Then MsgBox "Bin already Going Out but not received" DLookup returns only 1 value (at best). If none are found, try: ElseIf...
  2. W

    DLookup code not working in VBA

    Mir, What is [Orders Not Received] ? Are [Status] and [BinNumber] in tblGoingOut ? Wayne
  3. W

    DLookup code not working in VBA

    Mir, ElseIf DLookup("[BinNumber]", "tblGoingOut", "[Status]='" & [Orders Not Received] & "'") > 0 Then MsgBox "Bin already Going Out but not received" Wayne
  4. W

    update number of record with combolist

    Bader, I have no idea why you need it, but this should do it. Dim rst As DAO.RecordSet Set rst = CurrentDb.OpenRecordset("Select * from YourTable") While not rst.EOF and Not rst.BOF rst.Edit rst!YourField = Me.YourListBox.ItemData(Int(rst.AbsolutePosition/20)) rst.Update...
  5. W

    List Box Counts

    gemma, Yes. Me.ListBox.ItemData(0) is Header Me.ListBox.ItemData(1..n) is Data. Wayne
  6. W

    Dlookup that wont update beteen the rows

    Anders, We need to know your table structure to answer the question. The structure is very interesting to someone who wants to help solve your problem. Wayne
  7. W

    "NOT IN" Query confusing me

    Benny, You forgot the FRom (SELECT tmpJournalEntryChangeOrders.Concatenate From tmpJournalEntryChangeOrders); Wayne
  8. W

    Last Record(QueryDef or Recordset method??)

    Adam, I'm confused, what field are you trying to update? Replace the ??? with your field name. Dim rst As DAO.Recordset Set rst = CurrentDb.OpenRecordset("SELECT * " & _ "From tbl_module_repairs " & _ "Order by APS_RMA...
  9. W

    Question Auto Title Help

    page, MsgBox "Welcome " & Forms!YourMainForm!fname & " " & Forms!YourMainForm!sname Wayne
  10. W

    attempting to clean up a free form text box

    Jon, Even if you can't change the properties of the existing table you can clean this up to make it easier. 1) Keep the text attribute of the field, but strip the data down to just the number --> "4526" This will at least get everything consistent. 2) Change the label as David says: -->...
  11. W

    need help updating a field based off a selecton in a combo box

    Jon, Your code looks OK. Is the code located on the form that has the combobox? What is the value of Me.[PartNumber].Column(1) ? Wayne
  12. W

    Invalid Path (runtime error 3044)

    ColinH, Also: What is in strPath? Have you checked that the Linked tables are really pointing to the BE? Wayne
  13. W

    How can Function return multiple values and not be re-run in Query

    RX, You can code it so that the order of the call is not important. Public gblCriteria As String Public gblResult1 As String Public gblResult2 As String Public gblResult3 As String Public gblResult4 As String Public Function fnTest(strCriteria As String, WhichResult As Integer) As String ' '...
  14. W

    How can Function return multiple values and not be re-run in Query

    Rx, If the logic of the function can't be "compartmentalized" such that it doesn't reprocess the same queries to produce the individual results, then you have to ensure that it only does the queries once. Given that, here's two very simple scenarios: Option 1: (Evaluate at query-time)...
  15. W

    SQL Tables not Refreshing

    denileigh, All of my examples are at work, but this should help: http://www.codeproject.com/Tips/646080/Migrating-ACCESS-Jet-data-to-SQL-Server Wayne
  16. W

    Add apostrophe's to mixed data

    Jake, Assuming your column name is color ... Select Chr(34) & Replace(Color, Chr(34), '') & Chr(34) From YourTable Wayne
  17. W

    What is wrong with this code?

    cc, I think you just have to change your "Ors" to "Ands". (code) <-- Change these to square brackets 'this process update the Visibility Status 'If Date_Submitted_To_CMS = "" and Date_CMS_Approved ="" Private Sub Form_BeforeUpdate(Cancel As Integer) If (IsNull(Me.Date_Submitted_To_CMS0))...
  18. W

    Where Statment not needed

    Dick, This link show an example: http://www.access-programmers.co.uk/forums/showthread.php?t=257261&highlight=openform Wayne
  19. W

    Updating Table from a Query

    pachederm, Try: UPDATE tCBLAggregation SET tCBLAggregation.CBL_1_Date = [qBestof4CBLs_avg].[CBL_x_Date], tCBLAggregation.CBL_1_kW = [qBestof4CBLs_avg].[AvgOfCBL_x_kW] From tCBLAggregation, [qBestof4CBLs_avg] Where tCBLAggregation.[Event Date] = qBestof4CBLs_avg.[Event Start Date] AND...
  20. W

    Append data from table1 to table2 daily with no duplication

    Moore71, Insert: Insert Into Table2 (Productid, ProductName, Qty, CurrentDate) Select Table1.Productid, Table1.ProductName, Table1.Qty, Date() From Table1 Left Join Table2 on Table1.ProductID = Table2.ProductID Where Table2.ProductID Is Null Update...
Back
Top Bottom