Page 3 of 6 FirstFirst 123456 LastLast
Results 31 to 45 of 89
  1. #31
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Autonumber fields will not reset, so to speak, until after you do a compact and repair So if you delete all of the records, Autonumber will begin at 1 after a compact and repair. If you delete some of the latest records, Autonumber will begin with the next available after a compact and repair.

  2. #32
    tristandoo is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    43

    Final Product

    So after some branding and color adjustments (Them GS are crazy with their ways of setting up a darn logo) I give you the final product Version 1.6


    Thank you all so much for helping me out with this project. Would love to give you guys credit for it!
    Attached Files Attached Files

  3. #33
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Since your form is bound all you'd have to do is have an UNBOUND control on your form with a formula like

    =samoas1 + tagalongs1 + ....

    This is assuming (I don't remember) that each cookie is the name of the cookie with a 1 following it.

    same with a query you'd have something like

    TotalBoxes: samoas + taglongs + .... <remainder of cookie column names>

  4. #34
    tristandoo is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    43
    Well I am back. Would it be possible to have either A) the picture of the cookie turn gray (could be different image) when inventory is 0 or B) lock the field to the cookie to not be able to add any more of that cookie to a sale when inventory is 0. (I was thinking maybe C) play a "beep" when you click on a cookie with zero inventory)

    Do remember that the inventory is a calculated field.

  5. #35
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    That gets tricky. Textboxes have a feature called Conditional Formatting that can disable a textbox if a condition is met but Image controls don't have that. Image control doesn't even have an Enabled property to be manipulated.

    Try code for each cookie image Click.
    Code:
    Private Sub Image0_Click()
    If Me.Samoas + 1 > Me.Text26 Then
        DoCmd.Beep
        MsgBox "No boxes available."
        Me.Image0.Visible = False
    Else
        Me.Samoas = Me.Samoas + 1
    End If
    End Sub
    Probably also should have code in form Load event that makes image visible/not visible.

    Private Sub Form_Load()
    Me.Image0.Visible = Not Me.Text26 = 0
    Me.Image14.Visible = Not Me.Text28 = 0
    Me.Image16.Visible = Not Me.Text31 = 0
    Me.Image19.Visible = Not Me.Text33 = 0
    Me.Image21.Visible = Not Me.Text38 = 0
    Me.Image24.Visible = Not Me.Text55 = 0
    End Sub


    The images could be a 'grey' image. If you use 'grey' images, set their Visible property on the Property Sheet to no and remove the Not qualifier from the code expression.


    Code is much easier to read if controls have meaningful names, like: imgSamoas, tbxSamoasBal.
    Last edited by June7; 01-14-2014 at 03:09 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #36
    tristandoo is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    43
    Yes in the next releases (more likely the next) all of that cruddy naming will be changed, along with all that coding. I will try to try these different set ups later today or tomorrow.

  7. #37
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I made some changes to the suggested code and some other edits in my previous post.

    If you want the image click to be the only way to enter product sale, then might want to set the textboxes to Locked Yes and TabStop No to prevent typing into the boxes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #38
    tristandoo is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    43
    Alright here is what I got after tweaking the code and starting to rename things.
    Attached Files Attached Files

  9. #39
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Looks good. I would not allow users to adjust the value for quantity sold by changing the Locked property for fields like Samoas, Thinmints. etc. Setting Locked = No will mandate that the user click the Icon to adjust the quantity. Just like June suggested.

    This will address the obvious bugs. Alternative would be more code to trap issues before the user has an opportunity to break the app.

  10. #40
    tristandoo is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    43
    I want to right click and do Samoas = Samoas - 1
    This way if it is click too many times there is a way to subtract. Codding help please I keep getting error

  11. #41
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Right click is commonly known as the "Shortcut Menu". Custom menus might be a little too advanced. Perhaps another button to subtract or a click event on the amount value.

    me.samoas.locked = false
    me.Samoas = me.Samoas - 1
    me.samoas.locked = true

  12. #42
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Don't have to unlock textbox for programmatic edit of value.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #43
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You are right. I was confusing Enable with Lock. Actually, not sure what I was thinking...

  14. #44
    tristandoo is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    43
    What if I had something like Shift + LeftClick to do the - 1?

  15. #45
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    There is no event for Shift + LeftClick.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 3 of 6 FirstFirst 123456 LastLast
Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums