Search results

  1. S

    Days remaining in the month calculation

    solved!! =Day(DateSerial(Year([EmployeeStartDate]),Month([EmployeeStartDate])+1,0))-Day([EmployeeStartDate])
  2. S

    Days remaining in the month calculation

    Hi There I'm trying to work out how to find the remaining days left in a month, I have this formula in Excel which works but when I transfer it to access it brings up an error. =IF(R9C12="","",DAY(DATE(YEAR(R9C12),MONTH(R9C12)+1,0))-DAY(R9C12)) Any help would be appreciated.
  3. S

    Using a combo box to filter datasheet in split form

    Hi Cronk The fileron = false is great, thank you, however when I use the code for the string field I get a enter parameter value pop up to enter full name Should I need to reference the field in the form as in Forms![Training Records Menu]![Full Name]
  4. S

    Custom ribbon action button not working with vba

    Thank you for your help, I enabled the reference and this fixed my issue :)
  5. S

    Using a combo box to filter datasheet in split form

    Hi There I have a form with a combo box in split form which I want to use to filter the results in my datasheet at the bottom of my split form. I have the following code but when I make a selection it filters to a new record??? Private Sub CmbEmployeeSelector_AfterUpdate() Me.Filter =...
  6. S

    Custom ribbon action button not working with vba

    Hi There I am new to XML and have created a custom ribbon with an action button as a test before I create my own specific tabs and buttons, using the XML below: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <ribbon startFromScratch="false"> <tabs> <tab...
  7. S

    Open Report using criteria in a field column

    Thanks Paul, what can I say, it's been a long week :o
  8. S

    Open Report using criteria in a field column

    SOLVED: Open Report using criteria in a field column Hi There, I have the following code which opens a report from a button in a form. Private Sub CmbBookOrder_Click() Set rsTrans = Me.Inventory_Transactions_Orders_subform.Form.Recordset Set rsBDate =...
  9. S

    lookup recordset with criteria

    Column 1 which is the ID field from the products table.
  10. S

    lookup recordset with criteria

    SELECT [Current] AS Expr1, Products.[Product Name], [Inventory Stock Levels].[Current Stock] FROM Products INNER JOIN [Inventory Stock Levels] ON Products.[Product Code] = [Inventory Stock Levels].[Product Code] ORDER BY Products.[Product Name]; Current Stock is the column of Transaction...
  11. S

    lookup recordset with criteria

    Selected Stock = The quantity field in the table Inventory Transactions, this appears as a field in my subform called Inventory Transactions Orders Subform. The Current stock = The Transaction Item field in the table Products, this appears as a field in my subform, taken from the table...
  12. S

    lookup recordset with criteria

    SELECT Products.ID AS [Transaction ID], [Inventory Transactions].*, [Inventory Transaction Types].*, Products.*, IIf([Inventory Transaction Types]![Add/Remove]="Addition",[Inventory Transactions]![Quantity],IIf([Inventory Transaction Types]![Add/Remove]="Removal",-[Inventory...
  13. S

    lookup recordset with criteria

    I get the debug error Item not found in this collection on the line If rsTrans!CS < rsTrans!SS Then
  14. S

    lookup recordset with criteria

    This only works if I am on the selected row, the loop is there to search through each row in my sub form without me having to click on each row myself.
  15. S

    lookup recordset with criteria

    Yes I am looping through a record set. What I want to happen is that when looping through the recordset, if the current stock field is less than the quantity field the message box appears.
  16. S

    lookup recordset with criteria

    Hi There I have the below code that is looking through a recordset on an subform for the value 0 which is located in a column of a lookup field in the subform. The code works when looking up a zero or a specific number. Private Sub CmbPickOrder_Click() Set rsTrans =...
  17. S

    Set Focus after message box closes

    Hi All I have the following code which opens a message box: Private Sub Pick_Ship_Quantity_AfterUpdate() Dim CurrentStock As Long Dim SelectedStock As Long CurrentStock = Me.Transaction_Item.Column(2) SelectedStock = Me.Pick_Ship_Quantity If Me.Dirty = True Then Me.Dirty = False If...
  18. S

    Refer to feilds in subform within an If statement

    Hi Paul I have fixed my issue with the following code: Private Sub Pick_Ship_Quantity_AfterUpdate() Dim CurrentStock As Long Dim SelectedStock As Long CurrentStock = Me.Transaction_Item.Column(2) SelectedStock = Me.Pick_Ship_Quantity If Me.Dirty = True Then Me.Dirty = False If...
  19. S

    Refer to feilds in subform within an If statement

    Hi Paul I have re-looked at my issue and by turning the > to a < does work however this is incorrect as the values stored in the fields should only run the If statement when the picked amount is greater than the stock amount as there is not enough stock to fulfil the order. I also found...
  20. S

    Refer to feilds in subform within an If statement

    Thanks for all your help and advice Paul, I will try this tomorrow as it is late here now. I really appreciate your quick response to my post and replies on my first post. I'll let you know if it works Top Man! :)
Back
Top Bottom