Search results

  1. S

    Subform lost focus code doesnt prompt user

    Thanks for the reply, I tried with code Private Sub Cost_Code_BeforeUpdate(Cancel As Integer) If Forms![Mainform]![subform].Form![Cost Code].Value = "" Or IsNull Then MsgBox "Please make sure you add a cost code" Cancel = True End If End Sub But I can still leave this field blank without any...
  2. S

    Subform lost focus code doesnt prompt user

    Hi all Im trying to get it so a field within a subform can't be left blank, and if is a message box will prompt them to enter data. I cant change the properties of the table so the field is mandatory as there is already some data in it. My code is Private Sub Cost_Code_LostFocus() If...
  3. S

    Copy last record in subform

    I decided to revert back to my original method - how do you then use office clipboard to paste into the current subform field? Or is this a pain in the....
  4. S

    Copy last record in subform

    Apologies I had that code but still I get the error as above Forms![MainFOrm]![Subform].Form![Project].SetFocus DoCmd.RunCommand acCmdCopy
  5. S

    Copy last record in subform

    Great thanks for sticking by me on this one - Im getting there. Im now trying to use the DoCmd.RunCommand acCMDCopy but I get the error message that this command isnt available right now, why would this be?
  6. S

    Copy last record in subform

    Any ideas what would cause it to return a null value then? If I reference a record in the main form its fine - its just the subform :confused: Think Ive got it.. The main reason for so many problems withi this DB is that I inherited it, its not setup that well to be honest.
  7. S

    Copy last record in subform

    I seem to lack consistancy with my referral to the subform field I currently have Forms![MainForm]![Subform].Form![record].value But Im getting Null back when its not - this is triggered from a button within the MainForm - but my context is correct isnt it?
  8. S

    Copy last record in subform

    Managed to work out this bit - needed to add the reference into Access. For some unknown reason my returned value is null when I try to copy the field in the subform, using the immediate window. But I can see within the form there is a value there - confused.com :S
  9. S

    Copy last record in subform

    Wouldnt this mean that if the user didnt want this entry they woud then have to delete it? I was thinking something the lines of having a button available which copies the entry into the clipboard and then they can paste it - the code I currently have is Private Sub CopyBtn_Click() Dim...
  10. S

    Copy last record in subform

    hey... The reason is, if someone is selecting the same entry from a combo box numerous times they get fedup reselecting it. If I added a button then it would copy the previous entry in the subform and paste it into the corrosponding subform field on the next entry. The field is within a...
  11. S

    Copy last record in subform

    Did you ever get to the bottom of this? Im trying to achieve thesame thing...
  12. S

    Changing combo list based on button press

    Hi all.. Im trying to get my code so that when a button is pressed it will tick a checkbox which runs some code to display table values in a combo box. And then if its pressed again it reverts to the original options as per below: Private Sub MinutesCheck_Click() Dim strSQL As String If...
  13. S

    Help with VBA\MySql statement

    Actually, I think its been mentioned before about using a select statement within VBA - would the better method be to use a query?
  14. S

    Help with VBA\MySql statement

    Hi guys, One thing that I am determined to master is using VBA to query with mysql, I know it can be done creating a query and I have done so and then tried to convert that to vba\mysql but it doesnt work. Im guessing its because Ive got my code incorrect - could anyone shed some light on...
  15. S

    Controlling the size of a listbox with VBA?

    Sorted this, I think I had the wrong column set.
  16. S

    Controlling the size of a listbox with VBA?

    Cool, yeah I sussed it out but forgot to post back - thanks for your efforts though. A couple of things - is anyone else having problems with the forum? Its playing up this end. Also, trying to dsum a column in the list box. I thought I could do the following: Case "All Employees"...
  17. S

    Controlling the size of a listbox with VBA?

    Hi guys, Is it possible to set the size and columns which are displayed using VBA for a list box? I know you can control it in the form properties but I have 1 list box which 2 different queries run their results to and are different column widths dependent. Hope Im making sense? Thanks Shabba!
  18. S

    Problem with DLookup - Can anyone see why this isnt working?

    me.currentuser = simon.schuck although if it was confusing it wouldnt the return value be 27 rather than 0? Thanks
  19. S

    Problem with DLookup - Can anyone see why this isnt working?

    Thanks for that, unfortunatly the sGroupID value returned is still 0 when it should be 3 :confused:
  20. S

    Problem with DLookup - Can anyone see why this isnt working?

    Hi Guys, Ive got a DLookup within my VBA code and I cant for the life of me see why its not refererncing the correct field and returning the right result. As from the screen grab if I use the immediate window to query the variable its not whats in the table http://i.imgur.com/EZ4bZ.jpg Any...
Back
Top Bottom