My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
Posts: 14 Joined: 25-June 19 ![]() | Hey Guys, So I have a form "Department" and in this form I select a department from the drop down list and press the continue you button which opens up a transaction form. If I have records already created the form opens up flawlessly. But if I don't have any records created for that department I would like to have a message box that appears and asks the user if they would want to create the first record for that department and I can't seem to figure this out. I've attached the database so you can look at what I am trying to do. The message box code is on the on load event of the "Transactions"form. **Updated the zip file** This post has been edited by osmith96: Oct 31 2019, 12:24 PM Attached File(s) |
![]() Post#2 | |
Posts: 3,365 Joined: 27-February 09 ![]() | Use DCOUNT() to see if records exist for that value (in the combobox). If not, open some form in Add mode, and maybe set the value. Otherwise, open the form directly. |
![]() Post#3 | |
Posts: 14 Joined: 25-June 19 ![]() | Can you provide an example? |
![]() Post#4 | |
Posts: 6,182 Joined: 11-November 10 From: SoCal, USA ![]() | read up on the DCount() function in Access Help, so you understand how it works. read up on the OpenForm method in ditto. come back if you have specific questions or run into problems. hth tina -------------------- "the wheel never stops turning" |
![]() Post#5 | |
Posts: 71 Joined: 20-February 03 From: Stratford,Ct USA ![]() | You're making this more complicated than it needs to be. Just have the Transactions form open with the subform showing. The user will see immediately whether or not there are details. If he wants to add one, he can move the cursor to the "new record" line in the subform and just start typing. You don't have to ask him a question. He just does what needs to be done. |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 9th December 2019 - 08:48 PM |