Hello World

minimom21

New member
Local time
Today, 14:13
Joined
Dec 4, 2014
Messages
2
I'm a graphic artist/freelancer always looking for ways to automate and now have found myself building my client a not so simple database.

Right now I'm pecking for a simple answer to this question.

How can I make certain my user enters records on a subform before attempting to save the main form? Right now they can completely ignore the subform before saving the record.

The Main form has business address, etc. on it. the subform is bound to a join table that lists the multiple categories, subcategories and sector the business is listed in for a directory.

I already have my fields set to required at the table level in the join table, and have some existing VBA in both my subform (to update edited date) and my form (to validate empty records where a certain condition is met) but that's not the issue...

How do I focus the user to enter a record on the subform to the point where they are forced to enter something and complete the subform before the record is updated.

Thanks!
 
Welcome to the forum! Are all fields to be required on the subform or just some?
 
Thanks for the welcome!

In answer to your question -- yes and no...

If the user puts field BizActive to "No" or "Pending", then I don't require all the fields, just the BusinessName and who entered the record.

If BizActive is "Yes," then I have a Before Update script on the form that forces the user to put in the remaining fields necessary to make the record valid in some export / merge macros I've set up. (This all started as a printed directory project, so I need to make sure there aren't empty listings).

As far as my main issue, I think I was successful in using a .SetFocus action that points to my Subform on the Exit of BizActive. Now when the user leaves BizActive (which is a required field), the corresponding BizId from the main form populates in the Subform. In order to satisfy the required fields I have in my subform table (which is a join table) I created default entries in my subform that indicate a "pending" status.

If there is a simpler way to ensure subform data is viewed on a main form... I am still very interested to learn it!

A little bit more on me.... I've been using Access and relational databases for years, but only recently started delving into their actual construction and coding aspects. I'm at that dangerous stage where I feel like I can swim in the deep end, but probably shouldn't!

With this project I've successfully been able to create a database that takes all the active businesses and then reports them by Sector, Category and then Subcategory that I then export to link up to merge with a Word Merge doc. This creates the guts of a fully formatted thirty page annual business directory in a matter of minutes.... which I call automation domination.

Blessings, M
 

Users who are viewing this thread

Back
Top Bottom