Search results

  1. John Big Booty

    populate a combobox after updating a texfield?

    OK that sound's like a good reason not to use a combo, perhaps the addition of some validation on the user name would avoid the issue of miskeying.
  2. John Big Booty

    Tabbed form validation before switching tabs

    See how this works; Dim intPgIndx As Integer Dim ctl As Control intPgIndx = Me.YourTabCtrl.Pages(Me.YourTabCtrl).PageIndex For Each ctl In Me("YourTabCtrl").Pages(intPgIndx).Controls If IsNull(ctl) Or ctl = "" And Right(ctl.Name, 1) = "R" Then MsgBox...
  3. John Big Booty

    Form search BETWEEN

    Check this link for various criteria requirements, your code should probably look something like; Private Sub Year2_AfterUpdate() Me.Filter = "[Year] BETWEEN #" & Me.Year1 & "# AND #" & Me.Year2 & "#" Me.Filteron = True Debug.Print "[Year] BETWEEN #" & Me.Year1 & "# AND #" & Me.Year2 & "#"...
  4. John Big Booty

    Locking txt field after saved

    Don't know why i didn't notice before but Name is a reserved word :banghead: Change the field name or enclose it in square brackets; Me.[Name].Locked = True
  5. John Big Booty

    Extra records added to table

    Possibly your code should look like; Private Sub Serial_AfterUpdate() Dim MyDB As Database Dim hostname As String Set MyDB = CurrentDb If Me.Serial Like "PDS*" Then hostname = Right(Me.Serial, Len(Me.Serial) - 3) DoCmd.SetWarnings False DoCmd.RunSQL "INSERT INTO...
  6. John Big Booty

    Locking txt field after saved

    Try; Private Sub Lock_Click() Me.Name.Locked = True etc End Sub Private Sub Unlock_Click() Me.Name.Locked = False etc End Sub
  7. John Big Booty

    Exporting a Completed Form to PDF VBA

    Why not create a Report that replicates the feel of your form and send that direct to PDF (assuming you are using '07 or latter)?
  8. John Big Booty

    Tabbed form validation before switching tabs

    Here's a bit a a kludge that should solve that problem. Add an additional and unique character to the end of the name of all fields that are required; then amend the code to; Dim intPgIndx As Integer Dim ctl As Control intPgIndx = Me.YourTabCtrl.Pages(Me.YourTabCtrl).PageIndex For...
  9. John Big Booty

    last updated & last viewed

    Good to see you've got it working :)
  10. John Big Booty

    Update Table via Combobox

    Check this sample. Compare it with the previous sample and you should see they work in a very similar manner.
  11. John Big Booty

    Update Table via Combobox

    Perhaps the sample here is doing the sort of thing you are after.
  12. John Big Booty

    last updated & last viewed

    Which form/s do I need to look at, and what steps do I need to take?
  13. John Big Booty

    Tabbed form validation before switching tabs

    I think the following should do the trick; Dim intPgIndx As Integer Dim ctl As Control intPgIndx = Me.YourTabCtrl.Pages(Me.YourTabCtrl).PageIndex For Each ctl In Me("YourTabCtrl").Pages(intPgIndx).Controls If ctl.ControlType = acTextBox Then If IsNull(ctl) Or ctl = ""...
  14. John Big Booty

    last updated & last viewed

    The On Current event code I was suggesting was making the form dirty, but it does not trigger the Form's On Dirty event. So when I tested my On Dirty code, which I was doing, in isolation it worked not problems. However when combined with my On Current code it wasn't firing, but adding Me.Dirty...
  15. John Big Booty

    last updated & last viewed

    Are you able to post a copy of your DB? First do a compact and repair on it then put it in a zip and follow the direction here.
  16. John Big Booty

    Tabbed form validation before switching tabs

    Welcome to the Forum. Given that you are using buttons to move between tabs, you could incorporate some additional code in the buttons code to first validate the data before moving to the next tab. Without knowing that nature of your validation criteria, I can't advise further at this stage.
  17. John Big Booty

    Based on main form id, subform data should be shown

    If you only have one table why do you need a sub form :confused:
  18. John Big Booty

    Updating calculated dates from a form to a table

    Oh there are ways to do what you want but the question you need to ask is; Should I do it? The answer in most cases is do your calculation at either form or report level, using an unbound text box with the calculation as it's Record Source, or as you suggest at query level. The method you use...
  19. John Big Booty

    last updated & last viewed

    OK, been having a bit more of a mess around in the sand box, and the following should do what you want; for the last viewed put the following code in the form's On Current event; Me.LastViewed = Now() Me.Dirty = False and last updated use the following in the Form's On Dirty Event...
  20. John Big Booty

    Max Query to return one row only

    This article may also give you some pointers.
Back
Top Bottom