purpose of subform?

M

mike

forgot i wanted to ask about deploying the completed program. curious as to
what obstacles i might face if when i load the .mdb on the teacher network.
-do i copy the .mdb to a network drive for user access (no pun intended:)
-can mutiple users access it simultaneously?
 
G

Gina Whipp

You're most welcome...

Ummm, as a sidenote, "fiddle" on a copy. You don't want to accidently
"fiddle" with the working one and have it stop working!
 
M

mike

i hear ya. duly noted:)

Gina Whipp said:
You're most welcome...

Ummm, as a sidenote, "fiddle" on a copy. You don't want to accidently
"fiddle" with the working one and have it stop working!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II
 
J

John W. Vinson

forgot i wanted to ask about deploying the completed program. curious as to
what obstacles i might face if when i load the .mdb on the teacher network.
-do i copy the .mdb to a network drive for user access (no pun intended:)
-can mutiple users access it simultaneously?

They can... *BUT THEY SHOULDN'T*.

Sharing a .mdb in this way is a recipe for bad performance, bloat, user
contention, and risk of corruption.

Instead, use Tools... Database Utilities... Database Splitter Wizard to
"split" the database into a Frontend (containing the forms, reports, queries,
and code) and a Backend (containing the tables). Each user gets a copy of the
frontend, linked to the shared backend.

For details see http://www.granite.ab.ca/access/splitapp.htm or Google for
"Access split database".
 
M

mike

thx John i'll use the splitter...

*while testing i noticed that if the user selects a student from the
cboStudent, then you HAVE to select a subject from the cboSubject, else you
cannot do anything until you pick a subject. is there a way to remedy this
in the event the user wants to quit after selecting a student?

i tried adding a btnReset to reset cboStudent to null but cannot continue
until a subject is selected...
 
J

John W. Vinson

thx John i'll use the splitter...

*while testing i noticed that if the user selects a student from the
cboStudent, then you HAVE to select a subject from the cboSubject, else you
cannot do anything until you pick a subject. is there a way to remedy this
in the event the user wants to quit after selecting a student?

i tried adding a btnReset to reset cboStudent to null but cannot continue
until a subject is selected...

They should be able to hit <Esc> (perhaps twice) to clear all data entered on
the form. Perhaps you could post the actual code you're using and indicate
where the problem is occuring.
 
M

mike

They should be able to hit said:
the form.
that did the trick:) thx again.

one part of the interface is bugging me. the cboSubject and cboStudent
display in column format in the subform in form view, left to right.
however, i want the cboStudent in the left column and the cboSubject in the
right column. how can i switch them?
 
J

John W. Vinson

one part of the interface is bugging me. the cboSubject and cboStudent
display in column format in the subform in form view, left to right.
however, i want the cboStudent in the left column and the cboSubject in the
right column. how can i switch them?

I'd change the Default View property of the subform from Datasheet to
Continuous. You can then easily rearrange the controls in any order or
presentation you like in design view.

If you want to keep using the Datasheet view (which is IMO too inflexible for
the developer *AND* too flexible for the user, who can contract columns down
to zero and then complain that "my form doesn't display X"), open the form's
Query in design view and change the order of the columns.
 
M

mike

the default view property is not avaliable for subform but its available for
the main form?
 
J

John W. Vinson

the default view property is not avaliable for subform but its available for
the main form?

Are you looking at the properties of the Subform Control (the box on the
mainform containing the subform) or the properties of the Form object inside
that control (the latter is where you want to be)?
 
M

mike

Are you looking at the properties of the Subform Control (the box on the
mainform containing the subform) or the properties of the Form object inside
that control (the latter is where you want to be)?

Bingo. that was it:)
 
M

mike

its me again:) just so you know i'm almost there. was asked to add
additional items which was easy since i was using relationships.

newest issues since adding more fields/tables...
-when i add record to tblStudentSubject it overwrites existing record
instead of appending?
-how do i reset cbo to blank upon exit or enter...the last items selected
default to the cbo's when i reopen.
 
M

mike

i found my problem...didnt realize subform was displaying multiple records,
kept changing same record which is why the overwriting was occurring but that
leads me ...
how do i make the blank record default to the subform so other teachers
dont/cant change previous selections? or will the db splitter ensure
previous records cannot be altered?
 
J

John W. Vinson

newest issues since adding more fields/tables...
-when i add record to tblStudentSubject it overwrites existing record
instead of appending?

What's the Recordsource property of the subform? What controls are on it, and
what are their Control Sources?
-how do i reset cbo to blank upon exit or enter...the last items selected
default to the cbo's when i reopen.

Sounds like you may have the combo box unbound. As a rule the combo should
show the value that's actually in the table; you need to navigate to the blank
"new record" to add a new record!
 
M

mike

you need to navigate to the blank "new record" to add a new record!
-that was it:)

-how can i get the subform to default to a new record when the program opens?

-since all records in the table are present in the subform, what's to
prevent a user from changing an existing record?

thx.
 
J

John W. Vinson

i found my problem...didnt realize subform was displaying multiple records,
kept changing same record which is why the overwriting was occurring but that
leads me ...
how do i make the blank record default to the subform so other teachers
dont/cant change previous selections? or will the db splitter ensure
previous records cannot be altered?

Splitting will NOT permanently lock records... and as a rule you wouldn't want
to do so! Do your teachers never make mistakes and need to correct an entry
which was made previously!?

You can set the subform's Data Entry property to True; this will let you enter
new records but not even *see* old ones. Or, you can set the form's Allow
Additions property to Yes but Allow Edits to No to display old records but
prohibit adding new ones.

I'd really recommend using a Continuous Form for the subform, and make it big
enough that you can see the blank new record at the bottom; or you can put
some VBA code in the subform's Open event to navigate to the new record: click
the ... icon by the Open event property on the form and choose Code Builder,
and edit it to

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord, , acNewRecord
End Sub
 
M

mike

john,

i click new record and when i select a student from the cbo i get the
following dialog box: "The object doesnt contain the Automation object
StudentID..." which only started happening after i rebuilt my subform using
new tables/fields, any idea what's the cause of this?
 
J

John W. Vinson

john,

i click new record and when i select a student from the cbo i get the
following dialog box: "The object doesnt contain the Automation object
StudentID..." which only started happening after i rebuilt my subform using
new tables/fields, any idea what's the cause of this?

What's the Recordsource for the subform (post the SQL)? What's the Control
Source of the combo?

My guess is that the combo has a control source that is not a fieldname in the
new table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top