Search results

  1. F

    Select all text in a combobox when a user clicks it

    Gemma: marty has said he's already using gotfocus :-P the following works for me Private Sub txtControl_MouseUp(Button As Integer) Me.txtControl.SelStart = 0 Me.txtControl.SelLength = Len(Me.StockEnv.Text) End Subso i'm guessing the following should work for you Private Sub...
  2. F

    insert select with addtional value - confused newbie

    Hi All I'm trying to finally bridge the gap (or chasm rather) and start learning how to do SQL commands in VBA. What i'm trying to do is a simple invoice system where my Form selects the products from tblProducts and then creates a record in tblOrderDetails with Product AutoID from the current...
  3. F

    if [combobox] is empty then msgbox - not working

    That seems strange, you shouldn't need = True as Null will never be true or false - only null. that's where i got confused initially - it's a little different to SQL where you can use IS Null or IS NOT Null the correct sytnax should be Private Sub yourcontrol_Click() If...
  4. F

    if [combobox] is empty then msgbox - not working

    there should be End Sub at the end of it - must've missed it when i pasted it in.
  5. F

    is it possible to use mousewheel to scroll within textbox?

    Hi everyone I've been looking around trying to find a solution - I basically need to be able to use the mousewheel to scroll within a textbox - there seems to be 101 solutions to disable mousewheel! My DB currently generates a flyer with a list of products - there is a rich textbox which...
  6. F

    if [combobox] is empty then msgbox - not working

    UPDATE!!!!! wow - 30 seconds after posting I figured it out :-D correct command is If isNull(Forms!frmnavigation!cmbDistributionOrder) Then Private Sub btnNewOrder_Click() Dim intanswer As Integer If isNull(Forms!frmnavigation!cmbDistributionOrder) Then intanswer = _ MsgBox("No...
  7. F

    if [combobox] is empty then msgbox - not working

    Hi folks I'm trying to do a bit of cleanup on my db at the moment and i'm running into a problem with a combo box on my form. the main elements are the form - frmNavigation the combo box in question - cmbDistributionOrder and the button - btnNewOrder What i'm trying to do is create a simple...
  8. F

    Form code not behaving correctly with Split Form view

    Howdy I have a new piece of filter code that's working great on reports and on forms, however it's not working correctly with split form view. The code works fine if you double click the textbox on the form, but not if you click the same field in the split view. Private Sub...
  9. F

    Update Report filter to current control value or record

    Thanks Tim! It's not exactly what I was trying to do, as I wanted to filter a report that's already opened - but your filter code works great and my report does exactly what I want it to!!! I also ended up renaming the textbox to save confusion from the string Private Sub...
  10. F

    Update Report filter to current control value or record

    g'day I'm having some trouble with filtering a report I'd like to automate it so that doubleclicking on the current record filters out all the other ones. I've tried a few things but they don't seem to be working correctly Private Sub StockCode_DblClick(Cancel As Integer) Me.Filter =...
  11. F

    Duplicate duplicates

    I have a query that removes multiple records from my table, mostly for when we recieve stock for existing products in the database i'm using the code below to identify the records and i have another query which removes these records. SELECT product, ReportID, StocktakeAutoID, StockEnv...
  12. F

    Using Mousewheel to run query in textbox

    This isn't really a problem for me as the controls are on a subform - the only problem now i have is returning focus to the appropriate control after the record is saved. If Me.ActiveControl.Name = "StockEnv" Then Me.StockEnv = Me.StockEnv + (Count / -3) runcommand acCmdSaveRecord...
  13. F

    Using Mousewheel to run query in textbox

    Wow!!!!! Spot on. I've just tested it with my home db and it works brilliantly! I'll play with it some more and then put it in at work on monday and post some results. I think this will really open up some new avenues for interface design - seeing as most of the staff are lazy and don't like...
  14. F

    multiple criteria in IIF condition

    Thanks Mike, I haven't actually had to use OR in any of my IIF's - i just had a quick look at the MS site to find you in fact can use AND/OR in IIF syntax
  15. F

    multiple criteria in IIF condition

    I'm still fairly new to this too, It looks like you need to split up your command. As long as your data is pulled up in the form properties; it's just a matter of programming the appropriate text box You need to have the SELECT command as the Record Source in properties/data for the form...
  16. F

    multiple criteria in IIF condition

    You should be able to string it together with OR =IIF([name] ="John" OR "Fred" OR "Tom", "Manager", "Staff")
  17. F

    Using Mousewheel to run query in textbox

    Hello Does anyone know if it's at all possible to program the mousewheel to run a query in a textbox ie - i would like to update the quantity of stock +/- 1 by scrolling up or down within the textbox i'm thinking along the lines of Private Sub StockEnv_MouseWheel() DoCmd.OpenQuery...
  18. F

    grouping and sorting

    Thanks Wazz - Left to right is doing what I need it to do! Cheers! :p
  19. F

    grouping and sorting

    I have a database with a primary feature of sorting/categorising products based on the input text into a totally insane but explicit order on reports. The reports are sorting and grouping as required - what I'm trying to do now is essentially copy the exact same multi-tiered grouping and...
  20. F

    What event occurs when a combobox is empty

    if that's the case, then it isn't being triggered because it's not been updated. - maybe try dirty/clean or entry/exit (or mouse/key up or down)
Back
Top Bottom