PDA

View Full Version : Solved: Using a Form to input Form data... possible?



thomaspatton
09-10-2007, 02:31 PM
I've been monkeying around with this for a couple days now and I've gotten it down to where I can have the Form pop-up to input parameters for a Report. Was an easy enough copy/paste and then figure it out for different Queries and Reports. Don't hate me. Now, I'm running into another stopping point in my work project.

Is it possible to:

1) Click on a Score Entry form where I can put in students scores.
2) Have it Open a form to submit data for a parameter Query that looks up the class date.
3) Have it close the submit Form and open the Score Entry form with only the records available for that class found through the parameter Query.

I tried modifying what I plagerized from other bits and pieces, but of course it's erroring out and/or not placing the data on the form. Basically, what I need is to only be entering scores for a specific class using the form.

And, you might say, "Why not just use the Find/Replace function to filter your records?"

I can't. I'm making this for those less computer literate than I, so all data submission needs to be in a "Form" type view, not "all them boxes and stuff". Thanks for any help.

I also uploaded my current database in .zip format. I know I didn't put anything funny in it, but if there's something from somewhere else I'm sorry and I don't accept responsibility.

OBP
09-11-2007, 06:21 AM
I am looking at your database now.
Looking at the Form Score (TabStudent) Form what tdo you want to do from there?

thomaspatton
09-11-2007, 12:27 PM
Sweet.

When I click on FrmScore, I want FrmScoreInfo to open first. Then, I enter a class number, such as 13-13, and hit submit on FrmScoreInfo. After I submit, it runs query QueScore, and opens FrmScore. However, I only want to be able to enter scores for students from Class 13-13, not the entire TabStudent. I've gotten it to work with the reports (barely) but just don't know what I'm missing with forms.

Thanks for looking at this and helping!

OBP
09-12-2007, 04:21 AM
The conventional way to do this is from a Main Menu, so that when you want to open FrmScore, it opens FrmScoreInfo first.

thomaspatton
09-12-2007, 04:32 AM
I have it to where it will open FrmScoreInfo first so I can enter the data. However, even after I hit submit with a valid class number entry, it still shows FrmScore with all records from TabStudent, instead of only students from the Class I entered.

OBP
09-12-2007, 05:41 AM
Try this new version of your FrmScoreInfo form, it has a combo to select the class and filters the FrmScore with that class.

thomaspatton
09-12-2007, 11:04 AM
Doesn't work as intended, since it only filters for class 13-13 regardless of the input in FrmClassEntry. But, since you've brought up filters, can you apply a filter like that using another query-through-form?

OBP
09-12-2007, 01:22 PM
You do not need to, did you use the combo box to select the class, you do not enter the class in to the Class field, it is only there to show you what has been selected.

thomaspatton
09-12-2007, 06:19 PM
I used the combo box, and hit enter, but it still doesn't filter the unwanted classes from FrmScore. Everytime I open it, it just shows as filtered for Class 13-13.

I'm sure this is frustrating, but once again, thank you for all the help so far. Every little thing I mess with pushed me to a better understanding.

OBP
09-13-2007, 01:07 AM
You do noot use the Enter key on the combo box, you use the small down arrow to "select" one of the items from the list of possible classes and then click on it.
When you click on the desired class the FromScore form is automatically opened.

thomaspatton
09-13-2007, 05:53 AM
Ready to shoot me?

I use MS 2003 at work and MS 2007 at home. Didn't see the MS 2007 Macro blocking dialog.

It works just fine. Thanks OBP. Now off to make it look some kind of pretty!

thomaspatton
09-13-2007, 08:25 AM
OBP HELP!

Seriously, lol. Can you explain what the VBA does in the FrmScoreInfo you made? I'd like to be able to clone it for other Entry forms like that. You have it linked to the Select Class query and the FrmScore and I don't even see how. If you don't mind taking a few more moments to help me understand what I would need to change or what is actually going on here, I'd be much appreciative.

Private Sub Combo6_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CLASS NUMBER] = '" & Me![Combo6] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FrmScore"

stLinkCriteria = "[CLASS NUMBER]=" & "'" & Me![CLASS NUMBER] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub

*UPDATE*
Nevermind. I took a little bit to browse through the entire setup. Besides having links in the properties to the specific forms and queries, I've figured out how to modify your coding.

Once again, thank you for all the help.