473,320 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Forms - Msg Box if No Records

1
Hi everyone, I am looking for help with forms, I have a tabbed form with a main form page and subsequent tabs have subforms linked by a property/location id. If the user clicks on a tab where there are no records for the subform, I would like a message to display. For example if the user picks a facility from a dropdown list, they go to the main page of the form and can see the facility details, then they might select the maintenance call tab and if there have been none reported for that location, I would like a message box to pop up and say "No Maintenance has been requested"

I know very little about coding so if anyone can help, please explain it to me in the simplest of terms. I was able to do this with some macros for the reports but haven't had any luck in the form section.

Thanks for any help you can provide
Sep 27 '07 #1
1 1133
nico5038
3,080 Expert 2GB
Hmm, looks boring for the users to get such a message :-)

I've had a similar problem for a database and added the number of records to the tab's caption like:
Expand|Select|Wrap|Line Numbers
  1. Me.TabCtl197.Pages(0).Caption = Me.TabCtl197.Pages(0).Name & " (" & Me.sfrmKnowledgeLinkNavigate.Form.RecordsetClone.RecordCount & ")"
  2. Me.TabCtl197.Pages(1).Caption = Me.TabCtl197.Pages(1).Name & " (" & Me.sfrmPAMdata.Form.RecordsetClone.RecordCount & ")"
  3.  
Just add for every tab with a subform such a line in the form's OnOpen event and the users will see e.g.: Maintenance (0) / Locations (2) / etc.
Just replace "TabCtl197" with the name of your tabcontrol and "sfrmKnowledgeLinkNavigate" with the name of your subform and it should work.

Idea ?

Nic;o)
Oct 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: BLUE WATER | last post by:
Help, When I am finished entering in data into my form A, I press the save button that saves this new data to a new record. However I would like my other form to open at a specific record, the...
3
by: Greg Neef | last post by:
I need to develop a Tab Form where selecting a particular key from an unbound combo listbox will resulting in the display one or many records from several tables, where each tab has the matching...
4
by: Lumpierbritches | last post by:
Thank you once again for any and all assistance. I'm building an application that's getting quite bulky due to the number of forms, macros and procedures. I was wondering if there's a way to use 1...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
0
by: Privacy Trap | last post by:
Hi I have a slight problem in trying to set up 2 forms linked to tables. What I want to do is to inform a control on one form(Apps) as to the value of a key of a 'new' record entered via a...
2
by: joan.edington | last post by:
Hi, I've not done a lot of MS Access work and have been tasked with creating a database to record and report on stages of complaints cases. Each set of records for a case has a header, any...
1
by: paquer | last post by:
I have forms that are used in the office as well as in the field. I want user's to be able to print out an exact copy of the form for "in the field" data entry. (Yes we are still stuck in the 90's....
1
by: blueheelers | last post by:
I have been researching for several hours on the best way to display images in continous forms in Access 2003. For example, I want to display employee name, email, phone, and picture for each...
1
by: Wan | last post by:
Hi, I have a test project consists of two forms. The main form contains a datagrid and a button. On click of button I populate the datagrid with a ds.table(0) so far so good and on grid's...
7
by: Dave | last post by:
Hello All, These one may be a bit tricky, and what I'd like to do may not even be possible. I would love to hear any ideas you guys have for solving this. Here is the situation: I have a form...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.