Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Q and A _ Double Click To Open Form

Posted by: zeke1507 Sep 21 2019, 12:58 PM

Hello,

I am volunteering for a non-profit and built the attached database. It does everything I want it to except one thing. The user wants to have it in either Table or Datasheet view (Whichever gets this to work). "Church and School List" or "frmCSList". From there, they would like to Double Click on a record and have it open in Form view. (Basically open ChurchAndSchoolForm to that specific record.) I am writing explicit instructions so if they have to click on a specific column or something, that's fine. I just don't know enough code to get this event to take place. It seems like it shouldn't be too complicated, but I've reached the limit of my knowledge.

Thanks for the assist.

Posted by: GroverParkGeorge Sep 21 2019, 01:05 PM

Welcome to UtterAccess.

This Access Relational Database appears to contain real data, including email addresses.

I will download it for review, but I'm also going to remove it from the post. Privacy concerns are not to be taken lightly these days.

Posted by: jleach Sep 21 2019, 01:18 PM

Hi, welcome to UA.

As George mentions, we have to be careful about what we're posting. Usually the ideal scenario is when you can replicate the issue (or enough information to get the point across) in a sample database with fake data. For most tasks, this does not need to be more than a few rows in relevant tables. At the very least, all names and contact information should be removed or set to some fake value.

Good luck with your project,

Posted by: GroverParkGeorge Sep 21 2019, 01:24 PM

I took a look at the table in this accdb.

It is one flat file. It could be an Excel Spreadsheet, and in fact looks like it might have been imported from Excel.

Please invest some time in learning how Relational Databases, like Access, need to be designed to work with Relational Data.

The problem is not that you can't do it this way. You can. The problem is that "spreadsheet style" tables are so much more difficult to work with in a Relational Database. While it does take an initial investment in learning the difference between this sort of table and properly designed Relational Database tables, the pay off is down the road when it's so much easier to perform basic tasks, such as the one set out here.

Post back, please, with sample data that doesn't reveal personally identifiable data, and we'll help you get going.

Also please study https://www.UtterAccess.com/forum/index.php?showtopic=1998783 That will help you understand why we need to work on the table design as the first step.

Posted by: arnelgp Sep 21 2019, 02:04 PM

at least give us something to work on.

Posted by: GroverParkGeorge Sep 21 2019, 02:16 PM

I removed the first upload because it contains REAL names and REAL email and phone numbers. We try to avoid that.

We asked for sample data already.


Posted by: zeke1507 Sep 21 2019, 02:50 PM

I appreciate the assistance with the security. I apologize. I've never used a site like this before. Also, it was downloaded from Excel. Like I said, I'm volunteering for the org and not trying to invest too much time in this. It was a summer project I'm trying to help with, but I'm in over my head. We aren't trying to get this to do too much more and aren't looking to grow the database. Here is a database with fake data. Just a few records. The goal is to be able to open the frmCSList, double click a record and have it open to that specific record in ChurchAndSchoolForm.

I've taken a database class and know a little about the relational database component, but I didn't have the time to build it from scratch and still meet the deadline they needed the database to function by. I had to combine three Excel spreadsheets data into this one database and the manager loves what I've done so far, they just want this last addition. I know it's more difficult, but I don't have the capacity to put in the front end work, and it doesn't seem like it would be worth that amount of effort for this situation.

Again, thanks for the help.

 CS_Copy.zip ( 266.83K ): 5
 

Posted by: June7 Sep 21 2019, 03:09 PM

I've seen worse "flat file" database.

Advise not to use spaces nor punctuation/special characters in naming convention. Better would be: ZipOrPost, ParishOrSchool, IsEvent, DateAndTopic. Why would date and topic be in same field? Advise to separate.

I see you have some VBA code behind ParishShool textbox, however, event property does not have [Event Procedure] setting. Without it, control is not connected to code. How did you manage to accomplish that?

Also, filter criteria is wrong. And there is a misplaced comma in command parameters. Should be:

DoCmd.OpenForm "ChurchandSchoolForm", acNormal, , "ID = " & Me.ID


Posted by: zeke1507 Sep 21 2019, 03:20 PM

I deleted the Event Procedure and didn't realize the code had remained. I had looked at some forums previously and that was the code that I copied from there. I have no idea how to troubleshoot it. The thought process was if I double click the record in the parish school criteria, the form would open, but I got an error '13' message. So rather than knowing how to edit the code, I tried to delete it and start from scratch asking for help. I tried to piece this code based upon the code and form names in the piece being discussed.

Posted by: June7 Sep 21 2019, 03:37 PM

Deleting parameter from event property does not delete code, however, deleting entire code procedure would remove parameter from property.

Did the fixes work?

Posted by: arnelgp Sep 22 2019, 02:35 AM

here used Cris'O technique, modified
for 64x msa.

 CS_Copy.zip ( 196.9K ): 2
 

Posted by: zeke1507 Sep 22 2019, 10:48 AM

Yes this worked. Thanks so much!