bfollowell
New member
- Local time
- Today, 03:50
- Joined
- Feb 16, 2007
- Messages
- 6
I have a db that I've developed to help members of my maintenance department create major breakdown reports. We have a numbering system for these major breakdowns that is made up by XX-YY-999, where xx is a two character system code, YY is the two digit year and 999 is the 3 digit number of the corresponding MBR for that system for that year. I've developed a button that will create these MBR numbers based on the occurrence date that is entered in a date field and the system selected from a combo box. The VBA uses these year and selected system to create the next corresponding MBR number for that system/year. I played on my own and looked at a lot of references from these forums to get this working and it all seems to be working well.
Now on to my last roadblock. I want this button to only be enabled when creating a new record. Preferably it wouldn't even be visible until creating a new record. That way, no one could be looking at an older MBR record and inadvertently create a new number and overwrite the old one. I'm having trouble figuring out how to enable this button or make it visible only when creating this record. I know about the Me![cmdMBRNum].Enabled=False thing so the only thing I need to do is set the button to Me![cmdMBRNum].Enabled=True when creating a new record but I don't know how to trigger it or how to have Enabled=False by default until I trigger it.
Any ideas or is there just an easier way to do this altogether or have I just lost everyone? Thanks in advance.
Sincerely,
- Byron Followell
Now on to my last roadblock. I want this button to only be enabled when creating a new record. Preferably it wouldn't even be visible until creating a new record. That way, no one could be looking at an older MBR record and inadvertently create a new number and overwrite the old one. I'm having trouble figuring out how to enable this button or make it visible only when creating this record. I know about the Me![cmdMBRNum].Enabled=False thing so the only thing I need to do is set the button to Me![cmdMBRNum].Enabled=True when creating a new record but I don't know how to trigger it or how to have Enabled=False by default until I trigger it.
Any ideas or is there just an easier way to do this altogether or have I just lost everyone? Thanks in advance.
Sincerely,
- Byron Followell