Open Form ...

  • Thread starter Thread starter Kim
  • Start date Start date
K

Kim

I am using the following statement to open a form -
DoCmd.OpenForm "Search Engineering Files", , , "File_Num
= 'PlanNumber'"

But it doesn't take the PlanNumber I am accepting in
my current form.

I tried replacing 'PlanNumber' with value, it shows me
desired results.

My question is what am I doing wrong.

Before this statement, I tried displaying the value
of PlanNumber, it shows correct value.

Thank you in advance.

-Kim
 
Kim said:
I am using the following statement to open a form -
DoCmd.OpenForm "Search Engineering Files", , , "File_Num
= 'PlanNumber'"

But it doesn't take the PlanNumber I am accepting in
my current form.

I tried replacing 'PlanNumber' with value, it shows me
desired results.

My question is what am I doing wrong.

Before this statement, I tried displaying the value
of PlanNumber, it shows correct value.

Thank you in advance.

-Kim

My guess is that you want this:

DoCmd.OpenForm "Search Engineering Files", , , _
"File_Num = '" & PlanNumber & "'"
 
Dirk,

This works, how to make this form readonly?
I tried acFormReadOnly some place, I ran into problems.

Appreciate your help!

-Kim
 
Dirk,

I want to be able to view 'Search Engineering Form'
as Read Only and then Display another form for
data entry, Is it possible to leave both the forms open
side by side? Or maybe display 'Search Engineering Form'
on top and lower portion display the data entry form?

Thank you,
-Kim
 
Kim,

Open your form in design view, open properties and go to the Data tab. Set Allow
Additions and Allow Edits to No; this effectively makes your form Read Only.

Create a new unbound form. Insert the Search Engineering Form and your other
form as separate subforms on this new form. The main form is just a container
for the subforms and doesn't do anything. You can then enter data in the other
form while viewing Search Engineering Form.
 
Kim said:
Dirk,

This works, how to make this form readonly?
I tried acFormReadOnly some place, I ran into problems.

Probably in the wrong place, because that's the right keyword. Try
this:

DoCmd.OpenForm "Search Engineering Files", , , _
"File_Num = '" & PlanNumber & "'", _
acFormReadOnly

Or, to minimize confusion, you could use named arguments:

DoCmd.OpenForm "Search Engineering Files", _
WhereCondition:="File_Num = '" & PlanNumber & "'", _
DataMode:=acFormReadOnly

Be aware, though, that when you open a form in read-only mode, all
controls on the form become uneditable -- even unbound controls.
 
Kim said:
Dirk,

I want to be able to view 'Search Engineering Form'
as Read Only and then Display another form for
data entry, Is it possible to leave both the forms open
side by side?

I don't see why not. Have you tried it? Is there some problem?
Or maybe display 'Search Engineering Form'
on top and lower portion display the data entry form?

You could put put both of these forms as subforms on a main form, I
suppose. I'm not sure what you're after, but that sounds like what
you're describing.
 
Thank you,
-K
-----Original Message-----
Kim,

Open your form in design view, open properties and go to the Data tab. Set Allow
Additions and Allow Edits to No; this effectively makes your form Read Only.

Create a new unbound form. Insert the Search Engineering Form and your other
form as separate subforms on this new form. The main form is just a container
for the subforms and doesn't do anything. You can then enter data in the other
form while viewing Search Engineering Form.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com





.
 
Dirk,

Thank you for your replies!
I tried it before, I ran into some problem I can't
remember. But now it seems to be working.

-Kim
 
Back
Top