PopUp Form Help

I'm trying to create a pop-up form to allow users to enter data to table that 
main form is based on.  Due to size of main form and because pop-up fields 
will only be used per certain entries on main form, I want to use a pop-up 
form to enter needed data.  On the main form, I have the fields listed below. 
 For example, if user enters "TypeOne" as a PType and then enters Model, 
AfterUpdate to Model field a pop-up form opens with fields for UnitGroupName 
and UnitModelName.  I would like the UnitGroupName to be populated with "All 
TypeOne Products" when the pop-up opens and then select UnitModelName from a 
combo filtered on entry in UnitGroupName.


Main Form fRepairs
JobNumber (PK)
PType
Model

On AfterUpdate event for model :

Private Sub Model_AfterUpdate()
If Me.PumpType = "TestOne" Then
DoCmd.OpenForm "fGroupInfoForStatusCountCalculated", , , "JobNumber=" &      
Me.JobNumber
End If
End Sub

On form "fGroupInfoForStatusCountCalculated":

JobNumber
GroupUnitName
GroupModelName

Private Sub Form_Open(Cancel As Integer)
If Forms!frepairs!PumpType = "TestOne" Then
    Me.UnitGroupName = "All TestOne Products"
End If

When I enter a model to the Model field, it throws an error "you can't 
assign a value to this object" and on Debug this row is highlighted: 

Me.UnitGroupName = "All TestOne Products"

If anyone would please tell me what I'm doing wrong, I would greatly 
appreciate it.  I also have six PTypes to set up this way.  Once I get code 
in place, would it be better to use multiple "if" statements or "case select" 
statements - I'm never sure which to use in situations like this.

Thanks in advance for any help.
Pam


0
Utf
5/28/2010 4:40:03 PM
access.formscoding 7493 articles. 0 followers. Follow

6 Replies
1760 Views

Similar Articles

[PageSpeed] 42

Often, the Open event of a form is too early to enter data. Try using the 
Load event of the popup form to run this code

Private Sub Form_Load()
If Forms!frepairs!PumpType = "TestOne" Then
    Me.UnitGroupName = "All TestOne Products"
End If

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"PHisaw" <PHisaw@discussions.microsoft.com> wrote in message 
news:A3D50D88-1C4B-4F45-90B9-F61BD7DF1C7F@microsoft.com...
> I'm trying to create a pop-up form to allow users to enter data to table 
> that
> main form is based on.  Due to size of main form and because pop-up fields
> will only be used per certain entries on main form, I want to use a pop-up
> form to enter needed data.  On the main form, I have the fields listed 
> below.
> For example, if user enters "TypeOne" as a PType and then enters Model,
> AfterUpdate to Model field a pop-up form opens with fields for 
> UnitGroupName
> and UnitModelName.  I would like the UnitGroupName to be populated with 
> "All
> TypeOne Products" when the pop-up opens and then select UnitModelName from 
> a
> combo filtered on entry in UnitGroupName.
>
>
> Main Form fRepairs
> JobNumber (PK)
> PType
> Model
>
> On AfterUpdate event for model :
>
> Private Sub Model_AfterUpdate()
> If Me.PumpType = "TestOne" Then
> DoCmd.OpenForm "fGroupInfoForStatusCountCalculated", , , "JobNumber=" &
> Me.JobNumber
> End If
> End Sub
>
> On form "fGroupInfoForStatusCountCalculated":
>
> JobNumber
> GroupUnitName
> GroupModelName
>
> Private Sub Form_Open(Cancel As Integer)
> If Forms!frepairs!PumpType = "TestOne" Then
>    Me.UnitGroupName = "All TestOne Products"
> End If
>
> When I enter a model to the Model field, it throws an error "you can't
> assign a value to this object" and on Debug this row is highlighted:
>
> Me.UnitGroupName = "All TestOne Products"
>
> If anyone would please tell me what I'm doing wrong, I would greatly
> appreciate it.  I also have six PTypes to set up this way.  Once I get 
> code
> in place, would it be better to use multiple "if" statements or "case 
> select"
> statements - I'm never sure which to use in situations like this.
>
> Thanks in advance for any help.
> Pam
>
> 


0
Jeanette
5/28/2010 11:45:19 PM
Jeanette,

Thank you for responding to my question.  I did as you suggested and the 
form is opening as it should, I'm able to fill in data, but when I leave the 
form - AfterUpdate event: DoCmd.Close - I get a Write Conflict error: Record 
changed by another user since you started editing it...

I'm using the fields from the same query that the main form is based on.  If 
this is the problem, what would be the most efficient way to correct it?

I certainly appreciate your time and help.
Pam

"Jeanette Cunningham" wrote:

> Often, the Open event of a form is too early to enter data. Try using the 
> Load event of the popup form to run this code
> 
> Private Sub Form_Load()
> If Forms!frepairs!PumpType = "TestOne" Then
>     Me.UnitGroupName = "All TestOne Products"
> End If
> 
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> 
> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message 
> news:A3D50D88-1C4B-4F45-90B9-F61BD7DF1C7F@microsoft.com...
> > I'm trying to create a pop-up form to allow users to enter data to table 
> > that
> > main form is based on.  Due to size of main form and because pop-up fields
> > will only be used per certain entries on main form, I want to use a pop-up
> > form to enter needed data.  On the main form, I have the fields listed 
> > below.
> > For example, if user enters "TypeOne" as a PType and then enters Model,
> > AfterUpdate to Model field a pop-up form opens with fields for 
> > UnitGroupName
> > and UnitModelName.  I would like the UnitGroupName to be populated with 
> > "All
> > TypeOne Products" when the pop-up opens and then select UnitModelName from 
> > a
> > combo filtered on entry in UnitGroupName.
> >
> >
> > Main Form fRepairs
> > JobNumber (PK)
> > PType
> > Model
> >
> > On AfterUpdate event for model :
> >
> > Private Sub Model_AfterUpdate()
> > If Me.PumpType = "TestOne" Then
> > DoCmd.OpenForm "fGroupInfoForStatusCountCalculated", , , "JobNumber=" &
> > Me.JobNumber
> > End If
> > End Sub
> >
> > On form "fGroupInfoForStatusCountCalculated":
> >
> > JobNumber
> > GroupUnitName
> > GroupModelName
> >
> > Private Sub Form_Open(Cancel As Integer)
> > If Forms!frepairs!PumpType = "TestOne" Then
> >    Me.UnitGroupName = "All TestOne Products"
> > End If
> >
> > When I enter a model to the Model field, it throws an error "you can't
> > assign a value to this object" and on Debug this row is highlighted:
> >
> > Me.UnitGroupName = "All TestOne Products"
> >
> > If anyone would please tell me what I'm doing wrong, I would greatly
> > appreciate it.  I also have six PTypes to set up this way.  Once I get 
> > code
> > in place, would it be better to use multiple "if" statements or "case 
> > select"
> > statements - I'm never sure which to use in situations like this.
> >
> > Thanks in advance for any help.
> > Pam
> >
> > 
> 
> 
> .
> 
0
Utf
6/3/2010 6:58:03 PM
The write conflict error comes up when you have 2 forms based on the same 
table both open for editing at the same time.
If you hide the main form after opening the popup form, it should work.
You could probably just make the main form's allow edits, allow additions 
and allow delete to No, right before you open the popup and change it back 
when you close the popup, instead of hiding the main form.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"PHisaw" <PHisaw@discussions.microsoft.com> wrote in message 
news:7B242E41-14D9-45A6-B7B0-6FEAADAF5D26@microsoft.com...
> Jeanette,
>
> Thank you for responding to my question.  I did as you suggested and the
> form is opening as it should, I'm able to fill in data, but when I leave 
> the
> form - AfterUpdate event: DoCmd.Close - I get a Write Conflict error: 
> Record
> changed by another user since you started editing it...
>
> I'm using the fields from the same query that the main form is based on. 
> If
> this is the problem, what would be the most efficient way to correct it?
>
> I certainly appreciate your time and help.
> Pam
>
> "Jeanette Cunningham" wrote:
>
>> Often, the Open event of a form is too early to enter data. Try using the
>> Load event of the popup form to run this code
>>
>> Private Sub Form_Load()
>> If Forms!frepairs!PumpType = "TestOne" Then
>>     Me.UnitGroupName = "All TestOne Products"
>> End If
>>
>> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>>
>> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message
>> news:A3D50D88-1C4B-4F45-90B9-F61BD7DF1C7F@microsoft.com...
>> > I'm trying to create a pop-up form to allow users to enter data to 
>> > table
>> > that
>> > main form is based on.  Due to size of main form and because pop-up 
>> > fields
>> > will only be used per certain entries on main form, I want to use a 
>> > pop-up
>> > form to enter needed data.  On the main form, I have the fields listed
>> > below.
>> > For example, if user enters "TypeOne" as a PType and then enters Model,
>> > AfterUpdate to Model field a pop-up form opens with fields for
>> > UnitGroupName
>> > and UnitModelName.  I would like the UnitGroupName to be populated with
>> > "All
>> > TypeOne Products" when the pop-up opens and then select UnitModelName 
>> > from
>> > a
>> > combo filtered on entry in UnitGroupName.
>> >
>> >
>> > Main Form fRepairs
>> > JobNumber (PK)
>> > PType
>> > Model
>> >
>> > On AfterUpdate event for model :
>> >
>> > Private Sub Model_AfterUpdate()
>> > If Me.PumpType = "TestOne" Then
>> > DoCmd.OpenForm "fGroupInfoForStatusCountCalculated", , , "JobNumber=" &
>> > Me.JobNumber
>> > End If
>> > End Sub
>> >
>> > On form "fGroupInfoForStatusCountCalculated":
>> >
>> > JobNumber
>> > GroupUnitName
>> > GroupModelName
>> >
>> > Private Sub Form_Open(Cancel As Integer)
>> > If Forms!frepairs!PumpType = "TestOne" Then
>> >    Me.UnitGroupName = "All TestOne Products"
>> > End If
>> >
>> > When I enter a model to the Model field, it throws an error "you can't
>> > assign a value to this object" and on Debug this row is highlighted:
>> >
>> > Me.UnitGroupName = "All TestOne Products"
>> >
>> > If anyone would please tell me what I'm doing wrong, I would greatly
>> > appreciate it.  I also have six PTypes to set up this way.  Once I get
>> > code
>> > in place, would it be better to use multiple "if" statements or "case
>> > select"
>> > statements - I'm never sure which to use in situations like this.
>> >
>> > Thanks in advance for any help.
>> > Pam
>> >
>> >
>>
>>
>> .
>> 


0
Jeanette
6/4/2010 7:42:31 AM
Jeanette,

Thanks for responding after the long delay (weekend, holiday, other 
projects...).  While waiting for a response, I created a new table with just 
the fields for ID, JobNumber, UnitGroupName, ModelGroupName.  I based the 
pop-up on this table and used OnLoad instead of OnOpen and it seems to work 
well.  If I need to view all the job info at once, I can join tables with 
JobNumber.

Is it better to have a separate table for instances such as this or does it 
cause unnecessary database bloat?  I'm redesigning a major database and want 
to streamline it as much as possible?

Thanks for your help.
Pam

"Jeanette Cunningham" wrote:

> The write conflict error comes up when you have 2 forms based on the same 
> table both open for editing at the same time.
> If you hide the main form after opening the popup form, it should work.
> You could probably just make the main form's allow edits, allow additions 
> and allow delete to No, right before you open the popup and change it back 
> when you close the popup, instead of hiding the main form.
> 
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> 
> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message 
> news:7B242E41-14D9-45A6-B7B0-6FEAADAF5D26@microsoft.com...
> > Jeanette,
> >
> > Thank you for responding to my question.  I did as you suggested and the
> > form is opening as it should, I'm able to fill in data, but when I leave 
> > the
> > form - AfterUpdate event: DoCmd.Close - I get a Write Conflict error: 
> > Record
> > changed by another user since you started editing it...
> >
> > I'm using the fields from the same query that the main form is based on. 
> > If
> > this is the problem, what would be the most efficient way to correct it?
> >
> > I certainly appreciate your time and help.
> > Pam
> >
> > "Jeanette Cunningham" wrote:
> >
> >> Often, the Open event of a form is too early to enter data. Try using the
> >> Load event of the popup form to run this code
> >>
> >> Private Sub Form_Load()
> >> If Forms!frepairs!PumpType = "TestOne" Then
> >>     Me.UnitGroupName = "All TestOne Products"
> >> End If
> >>
> >> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> >>
> >> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message
> >> news:A3D50D88-1C4B-4F45-90B9-F61BD7DF1C7F@microsoft.com...
> >> > I'm trying to create a pop-up form to allow users to enter data to 
> >> > table
> >> > that
> >> > main form is based on.  Due to size of main form and because pop-up 
> >> > fields
> >> > will only be used per certain entries on main form, I want to use a 
> >> > pop-up
> >> > form to enter needed data.  On the main form, I have the fields listed
> >> > below.
> >> > For example, if user enters "TypeOne" as a PType and then enters Model,
> >> > AfterUpdate to Model field a pop-up form opens with fields for
> >> > UnitGroupName
> >> > and UnitModelName.  I would like the UnitGroupName to be populated with
> >> > "All
> >> > TypeOne Products" when the pop-up opens and then select UnitModelName 
> >> > from
> >> > a
> >> > combo filtered on entry in UnitGroupName.
> >> >
> >> >
> >> > Main Form fRepairs
> >> > JobNumber (PK)
> >> > PType
> >> > Model
> >> >
> >> > On AfterUpdate event for model :
> >> >
> >> > Private Sub Model_AfterUpdate()
> >> > If Me.PumpType = "TestOne" Then
> >> > DoCmd.OpenForm "fGroupInfoForStatusCountCalculated", , , "JobNumber=" &
> >> > Me.JobNumber
> >> > End If
> >> > End Sub
> >> >
> >> > On form "fGroupInfoForStatusCountCalculated":
> >> >
> >> > JobNumber
> >> > GroupUnitName
> >> > GroupModelName
> >> >
> >> > Private Sub Form_Open(Cancel As Integer)
> >> > If Forms!frepairs!PumpType = "TestOne" Then
> >> >    Me.UnitGroupName = "All TestOne Products"
> >> > End If
> >> >
> >> > When I enter a model to the Model field, it throws an error "you can't
> >> > assign a value to this object" and on Debug this row is highlighted:
> >> >
> >> > Me.UnitGroupName = "All TestOne Products"
> >> >
> >> > If anyone would please tell me what I'm doing wrong, I would greatly
> >> > appreciate it.  I also have six PTypes to set up this way.  Once I get
> >> > code
> >> > in place, would it be better to use multiple "if" statements or "case
> >> > select"
> >> > statements - I'm never sure which to use in situations like this.
> >> >
> >> > Thanks in advance for any help.
> >> > Pam
> >> >
> >> >
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
6/4/2010 1:16:39 PM
When designing tables for a database, forget about forms and concentrate on 
the real world things that the database is dealing with.
There are many articles on normalization for a database on the internet, 
read up on some of them - having a normalized table structure is the key to 
a successful database.

For that problem with the popup that we have been discussing, the code we 
discussed is a better alternative than creating a separate table to get 
around the error, unless normalizing the database makes it mandatory to have 
that extra table for ID, JobNumber, UnitGroupName, ModelGroupName.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"PHisaw" <PHisaw@discussions.microsoft.com> wrote in message 
news:91DE8C4F-823C-424C-9CF8-26B6D5A165B4@microsoft.com...
> Jeanette,
>
> Thanks for responding after the long delay (weekend, holiday, other
> projects...).  While waiting for a response, I created a new table with 
> just
> the fields for ID, JobNumber, UnitGroupName, ModelGroupName.  I based the
> pop-up on this table and used OnLoad instead of OnOpen and it seems to 
> work
> well.  If I need to view all the job info at once, I can join tables with
> JobNumber.
>
> Is it better to have a separate table for instances such as this or does 
> it
> cause unnecessary database bloat?  I'm redesigning a major database and 
> want
> to streamline it as much as possible?
>
> Thanks for your help.
> Pam
>
> "Jeanette Cunningham" wrote:
>
>> The write conflict error comes up when you have 2 forms based on the same
>> table both open for editing at the same time.
>> If you hide the main form after opening the popup form, it should work.
>> You could probably just make the main form's allow edits, allow additions
>> and allow delete to No, right before you open the popup and change it 
>> back
>> when you close the popup, instead of hiding the main form.
>>
>> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>>
>> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message
>> news:7B242E41-14D9-45A6-B7B0-6FEAADAF5D26@microsoft.com...
>> > Jeanette,
>> >
>> > Thank you for responding to my question.  I did as you suggested and 
>> > the
>> > form is opening as it should, I'm able to fill in data, but when I 
>> > leave
>> > the
>> > form - AfterUpdate event: DoCmd.Close - I get a Write Conflict error:
>> > Record
>> > changed by another user since you started editing it...
>> >
>> > I'm using the fields from the same query that the main form is based 
>> > on.
>> > If
>> > this is the problem, what would be the most efficient way to correct 
>> > it?
>> >
>> > I certainly appreciate your time and help.
>> > Pam
>> >
>> > "Jeanette Cunningham" wrote:
>> >
>> >> Often, the Open event of a form is too early to enter data. Try using 
>> >> the
>> >> Load event of the popup form to run this code
>> >>
>> >> Private Sub Form_Load()
>> >> If Forms!frepairs!PumpType = "TestOne" Then
>> >>     Me.UnitGroupName = "All TestOne Products"
>> >> End If
>> >>
>> >> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>> >>
>> >> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message
>> >> news:A3D50D88-1C4B-4F45-90B9-F61BD7DF1C7F@microsoft.com...
>> >> > I'm trying to create a pop-up form to allow users to enter data to
>> >> > table
>> >> > that
>> >> > main form is based on.  Due to size of main form and because pop-up
>> >> > fields
>> >> > will only be used per certain entries on main form, I want to use a
>> >> > pop-up
>> >> > form to enter needed data.  On the main form, I have the fields 
>> >> > listed
>> >> > below.
>> >> > For example, if user enters "TypeOne" as a PType and then enters 
>> >> > Model,
>> >> > AfterUpdate to Model field a pop-up form opens with fields for
>> >> > UnitGroupName
>> >> > and UnitModelName.  I would like the UnitGroupName to be populated 
>> >> > with
>> >> > "All
>> >> > TypeOne Products" when the pop-up opens and then select 
>> >> > UnitModelName
>> >> > from
>> >> > a
>> >> > combo filtered on entry in UnitGroupName.
>> >> >
>> >> >
>> >> > Main Form fRepairs
>> >> > JobNumber (PK)
>> >> > PType
>> >> > Model
>> >> >
>> >> > On AfterUpdate event for model :
>> >> >
>> >> > Private Sub Model_AfterUpdate()
>> >> > If Me.PumpType = "TestOne" Then
>> >> > DoCmd.OpenForm "fGroupInfoForStatusCountCalculated", , , 
>> >> > "JobNumber=" &
>> >> > Me.JobNumber
>> >> > End If
>> >> > End Sub
>> >> >
>> >> > On form "fGroupInfoForStatusCountCalculated":
>> >> >
>> >> > JobNumber
>> >> > GroupUnitName
>> >> > GroupModelName
>> >> >
>> >> > Private Sub Form_Open(Cancel As Integer)
>> >> > If Forms!frepairs!PumpType = "TestOne" Then
>> >> >    Me.UnitGroupName = "All TestOne Products"
>> >> > End If
>> >> >
>> >> > When I enter a model to the Model field, it throws an error "you 
>> >> > can't
>> >> > assign a value to this object" and on Debug this row is highlighted:
>> >> >
>> >> > Me.UnitGroupName = "All TestOne Products"
>> >> >
>> >> > If anyone would please tell me what I'm doing wrong, I would greatly
>> >> > appreciate it.  I also have six PTypes to set up this way.  Once I 
>> >> > get
>> >> > code
>> >> > in place, would it be better to use multiple "if" statements or 
>> >> > "case
>> >> > select"
>> >> > statements - I'm never sure which to use in situations like this.
>> >> >
>> >> > Thanks in advance for any help.
>> >> > Pam
>> >> >
>> >> >
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Jeanette
6/4/2010 10:24:56 PM
Jeanette,

Thanks for the info.  I will try your suggestions and see if I can get it to 
work without the additional table.

I appreciate your help.
Pam

"Jeanette Cunningham" wrote:

> When designing tables for a database, forget about forms and concentrate on 
> the real world things that the database is dealing with.
> There are many articles on normalization for a database on the internet, 
> read up on some of them - having a normalized table structure is the key to 
> a successful database.
> 
> For that problem with the popup that we have been discussing, the code we 
> discussed is a better alternative than creating a separate table to get 
> around the error, unless normalizing the database makes it mandatory to have 
> that extra table for ID, JobNumber, UnitGroupName, ModelGroupName.
> 
> 
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> 
> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message 
> news:91DE8C4F-823C-424C-9CF8-26B6D5A165B4@microsoft.com...
> > Jeanette,
> >
> > Thanks for responding after the long delay (weekend, holiday, other
> > projects...).  While waiting for a response, I created a new table with 
> > just
> > the fields for ID, JobNumber, UnitGroupName, ModelGroupName.  I based the
> > pop-up on this table and used OnLoad instead of OnOpen and it seems to 
> > work
> > well.  If I need to view all the job info at once, I can join tables with
> > JobNumber.
> >
> > Is it better to have a separate table for instances such as this or does 
> > it
> > cause unnecessary database bloat?  I'm redesigning a major database and 
> > want
> > to streamline it as much as possible?
> >
> > Thanks for your help.
> > Pam
> >
> > "Jeanette Cunningham" wrote:
> >
> >> The write conflict error comes up when you have 2 forms based on the same
> >> table both open for editing at the same time.
> >> If you hide the main form after opening the popup form, it should work.
> >> You could probably just make the main form's allow edits, allow additions
> >> and allow delete to No, right before you open the popup and change it 
> >> back
> >> when you close the popup, instead of hiding the main form.
> >>
> >> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> >>
> >> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message
> >> news:7B242E41-14D9-45A6-B7B0-6FEAADAF5D26@microsoft.com...
> >> > Jeanette,
> >> >
> >> > Thank you for responding to my question.  I did as you suggested and 
> >> > the
> >> > form is opening as it should, I'm able to fill in data, but when I 
> >> > leave
> >> > the
> >> > form - AfterUpdate event: DoCmd.Close - I get a Write Conflict error:
> >> > Record
> >> > changed by another user since you started editing it...
> >> >
> >> > I'm using the fields from the same query that the main form is based 
> >> > on.
> >> > If
> >> > this is the problem, what would be the most efficient way to correct 
> >> > it?
> >> >
> >> > I certainly appreciate your time and help.
> >> > Pam
> >> >
> >> > "Jeanette Cunningham" wrote:
> >> >
> >> >> Often, the Open event of a form is too early to enter data. Try using 
> >> >> the
> >> >> Load event of the popup form to run this code
> >> >>
> >> >> Private Sub Form_Load()
> >> >> If Forms!frepairs!PumpType = "TestOne" Then
> >> >>     Me.UnitGroupName = "All TestOne Products"
> >> >> End If
> >> >>
> >> >> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> >> >>
> >> >> "PHisaw" <PHisaw@discussions.microsoft.com> wrote in message
> >> >> news:A3D50D88-1C4B-4F45-90B9-F61BD7DF1C7F@microsoft.com...
> >> >> > I'm trying to create a pop-up form to allow users to enter data to
> >> >> > table
> >> >> > that
> >> >> > main form is based on.  Due to size of main form and because pop-up
> >> >> > fields
> >> >> > will only be used per certain entries on main form, I want to use a
> >> >> > pop-up
> >> >> > form to enter needed data.  On the main form, I have the fields 
> >> >> > listed
> >> >> > below.
> >> >> > For example, if user enters "TypeOne" as a PType and then enters 
> >> >> > Model,
> >> >> > AfterUpdate to Model field a pop-up form opens with fields for
> >> >> > UnitGroupName
> >> >> > and UnitModelName.  I would like the UnitGroupName to be populated 
> >> >> > with
> >> >> > "All
> >> >> > TypeOne Products" when the pop-up opens and then select 
> >> >> > UnitModelName
> >> >> > from
> >> >> > a
> >> >> > combo filtered on entry in UnitGroupName.
> >> >> >
> >> >> >
> >> >> > Main Form fRepairs
> >> >> > JobNumber (PK)
> >> >> > PType
> >> >> > Model
> >> >> >
> >> >> > On AfterUpdate event for model :
> >> >> >
> >> >> > Private Sub Model_AfterUpdate()
> >> >> > If Me.PumpType = "TestOne" Then
> >> >> > DoCmd.OpenForm "fGroupInfoForStatusCountCalculated", , , 
> >> >> > "JobNumber=" &
> >> >> > Me.JobNumber
> >> >> > End If
> >> >> > End Sub
> >> >> >
> >> >> > On form "fGroupInfoForStatusCountCalculated":
> >> >> >
> >> >> > JobNumber
> >> >> > GroupUnitName
> >> >> > GroupModelName
> >> >> >
> >> >> > Private Sub Form_Open(Cancel As Integer)
> >> >> > If Forms!frepairs!PumpType = "TestOne" Then
> >> >> >    Me.UnitGroupName = "All TestOne Products"
> >> >> > End If
> >> >> >
> >> >> > When I enter a model to the Model field, it throws an error "you 
> >> >> > can't
> >> >> > assign a value to this object" and on Debug this row is highlighted:
> >> >> >
> >> >> > Me.UnitGroupName = "All TestOne Products"
> >> >> >
> >> >> > If anyone would please tell me what I'm doing wrong, I would greatly
> >> >> > appreciate it.  I also have six PTypes to set up this way.  Once I 
> >> >> > get
> >> >> > code
> >> >> > in place, would it be better to use multiple "if" statements or 
> >> >> > "case
> >> >> > select"
> >> >> > statements - I'm never sure which to use in situations like this.
> >> >> >
> >> >> > Thanks in advance for any help.
> >> >> > Pam
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
6/7/2010 2:31:43 PM
Reply:

Similar Artilces:

Organization Forms #2
Unable to see the "Organization Forms" library in Outlook 2003. Anybody experience this ? I've created the folder below "EForms Registry" in ESM, checked permissions but the library does not show up. Enviroment: Exchange 2003, SP1,4-Node cluster, 3 Virtual Servers, Public Folder tree on 1 Virtual Server. Any help would be appreciated ! -Mike ...

Criteria to return all records if selection from form is null
Hi, I'm trying to pass multiple query criteria from form controls. I'm using the following type of syntax for the criteria: Like Nz([Forms]![ViewEdit Completed Procedures]![SelectOBy],"*") And this works fine for the fields where there are no Nulls in the data, but if there are Nulls in this field I don't get those records. Quite understandable since Like "*" doesn't return Nulls. What I'm trying to do is to return all records when there is nothing chosen in the selection box on the form. I've tried a bunch of different IIfs wi...

i need your help
i am providing you with my problem with an excel attachment file please reply me asap. Attachment filename: help me.xls Download attachment: http://www.excelforum.com/attachment.php?postid=463626 --- Message posted from http://www.ExcelForum.com/ Hi I would suggest using Data / Filter / AutoFilter. This is a very simple yet effective way of doing what you want. If you need to create separate 'tables' you can use the Advanced Filter Andy. "mangesh >" <<mangesh.12lfkr@excelforum-nospam.com> wrote in message news:mangesh.12lfkr@e...

Outlook Help #11
I am running outlook express 5 for mac. I would like to no how to put a graphic in with my signature. What kind of file and how to import it in. Thanks for any help!! PrePress <art@graphiccraft.com> wrote: > I am running outlook express 5 for mac. > I would like to no how to put a graphic in with my signature. > What kind of file and how to import it in. > Thanks for any help!! Ask in an Outlook Express newsgroup. -- Brian Tillman ...

VBA editor & help
Is there any way to keep the VBA window from re-sizing when help is used? I can start help, resize the editor, ALT-TAB to help and the editor shrinks again. Excel 2K. Thanks, Mike If you are comfortable modifying the system registry with RegEdit (remember, there are no "undo" or "save without changes" operations with the registry -- everything is live), you can add a new DWORD value named "IsFloating" and give it a value of 1. Create this value in the key: HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\HelpViewer Restart Excel after you create the Is...

Can Anyone Help me?
Hi, I'm new to Pub 2003. I am creating an advert. I have used the rectangular 'auto-shape' and filled it with a transparent fade to black. Ofcourse it is very important that it is transparent, but when I come to print it, it appears as a solid rectangle. Does anyone know how to change this and basically print how you see it on the screen?? Many thanks, Ben Publisher has always had problems with transparency. Create your auto-shape with your preferred transparency. Right-click, save as picture. Choose .png. Re-insert into your publication. -- Mary Sauer http://msauer.mv...

outlook express frozen HELP!
when I click to reply to a sender, the reply box never pops up and outlook express becomes frozen so i do ctrl, alt delete and it says its not responding so i end task and try to reopen and it says outlook is still running i dunno how to fix this.....please help sophie ...

How do I auto sum on a form in publisher
I am trying to create a form that would auto sum columns like Excel. I can't figure it out! About the only way is to insert the Excel form as an Object. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Dawn" <Dawn@discussions.microsoft.com> wrote in message news:CD9B3D05-A0C5-4095-AB55-BC627D57DB50@microsoft.com... >I am trying to create a form that would auto sum columns like Excel. I can't > figure it out! ...

"change order form"
Does anyone have a change order template that I can review? ...

Upload Form From MS word 2000
If there is anyone ot there that can help me out with this issue, I would be eternally greatful. I have created a form in ms word and I need this form added to my Website. There's only one problem. . . . I haven't the darndest idea as how to upload the stinking form!!!!!! In Desperate Times, Karl D. Ross Address this question to a word newsgroup or a html ng, not to the Microsoft CRM ng. -- Brandon IT Director Office Equipment & Supplies at http://www.presentationsdirect.com "Karl D. Ross" <diamondross1@comcast.net> wrote in message news:1fc301c352fc$9...

HELP scanpst.exe fails
Outlook 2000 fails to open and recommends running the inbox repair tool. When running the tool it fails and gives the following error message: An error has occurred which caused the scan to stop. No changes have been made to the scanned file. The .pst file is 1.96 GB. The mail is downaloaded from our ISP, so it resides only on the .pst. We need to resolve this problem ASAP. PLEASE HELP! Thanks in advance, Emjay Your .PST file is dangerously close to the 2GB limit. If scanpst.exe isn't working, you may need to use the crop tool. Look here for the information you need to hopefull...

help with the script
Hi all, windows 2003 SP2 server I just need to find out that new pdf files have been added to one directory ex:123 and sub directories every 15 days. Can anyone help me with the script? Thank you. "ed" <ed@discussions.microsoft.com> wrote in message news:2EDEE976-93D1-4557-87E7-7EC2E0B1AC20@microsoft.com... > Hi all, > > windows 2003 SP2 server > > I just need to find out that new pdf files have been added to one > directory > ex:123 and sub directories every 15 days. > > Can anyone help me with the script? > >...

Help w/ Auto Accept Agent
Hi Everyone. I am installing the Auto Accept Agent in order to facilitate scheduling conference rooms for meetings. This is the first time I've ever used this plug-in. I've created the user account, conference.room@ourdomain.com, and am ready to download the Windows Installer Package. There are a couple of things I am unclear about and want to understand before I proceed. First, when I run the .msi, one of the questions asked is to "Run as Local System" or "This user"? Can anybody explain the difference and when I would use each one? Second, to register th...

Help with unusual table problem
I would like to be able to add additional data to a table of approx. 2 rows and 4 columns. I would also like the newest data to be on to while the remaining 19 lines all shift one row down and the leas current row of data to drop off. I hope this explains my problem. Thanks, Howd -- Message posted from http://www.ExcelForum.com Not sure if you might have missed my suggestion to your earlier post yesterday in microsoft.public.excel. ( http://tinyurl.com/239sq ) Based on your "revised" specs in this post: Let's say your table is in Sheet1 in A1:D20 [assume an initial tab...

5.5 to 2003 migration.... please help!
ok, so we have an existing 5.5 server up and running for several years with 1000+ mailboxes. we just finished installing exchange 2003 on a new server. i assume we're ready to move mailboxes? how exactly do i start this process? is it a tool within exchange 2003, or 5.5? also, am i missing anything else? i ran forestprep and domainprep, installed exchange... am i infact ready to move mailboxes or is there something else? if anyone can think of anything else im going to run into, please let me know. thank you! You should have set up the Active Directory Connector. Did you do this...

Force rounding up in form
I have a calculation that converts markup to margin in a form. Basically, when a user types in a value in one text box, the result in another text box will be the corresponding margin. The calculation is encoded in the vba of the form. My problem is that some of the numbers are not rounding up properly. For instance, a markup of 8.75 should convert to 8.1, but instead showing as 8.0, the raw data is actually 8.04597759246826. I would think using a text box format of 0.0 should round it up, but it's not working. I need it to display 8.1 at both the form and table levels for auditing p...

XSD Restrictions help please
Greetings all. Is it possible to create a schema to enforce the following issue. If the value for required Attribute A within Element E has an enumerated value of ‘myType’ then element E also needs to have Attribute B. Xml example below E=Item A=type B=len <Items> <Item type=” myType” len=”5” /> <Item type=” NOTmyType” /> </Items> Any help or a point in a semi right direction would be very helpful :) AdamH wrote: > Is it possible to create a schema to enforce the following issue. > > If the value for required Attribute A within Element E has an...

Export from a form
I know there are several ways to programatically export, like docmd.transferspreadsheet, but I want to export data from a form. I however do not want the file button available to my users. I thought this might work DoCmd.DoMenuItem , acfilemenu, acExport, , acMenuVer70 but it did not. Basically all I want to do is have a command button act like what happens when you click file, export. I want the user to click the button, and then select the location and the format to export to. Am I on the correct track with the DoMenuItem? Nevermind, I figured it out. I guess it helps to keep rea...

Need Help #9
Hi This =IF(H2,MIN(10,H2),0) returns the numbers from column H with a maximum of 10. The formula is returning 10 if the cell is 10 or over, is something wrong. Question: I need it to return 0 if 10 or over. Microsoft Excel 2002 Thanks in advance Dave On Mon, 14 Nov 2005 16:43:49 -0000, "Dave 2005" <dave@zillion.karoo.co.uk> wrote: >Hi > >This =IF(H2,MIN(10,H2),0) returns the numbers from column H with a maximum >of 10. > >The formula is returning 10 if the cell is 10 or over, is something wrong. > >Question: I need it to return 0 if 10 or ...

Help, please: sorting the Legend
I'm lucky if I use 10% of the power of Excel. I would be grateful for advice. Ten salesmen on a team. At the end of each month, their cumulative totals for the year are updated. The spreadsheet gets re-sorted, showing their standing in rank order. Simple enough. At the beginning of the year, I created a line chart to track each person's progress. I initially listed the names in alphabetical order and defined the series accordingly. The problem comes when I do the end of the month re-sort. The names in the Legend are no longer in alphabetical order but neither do they correctly corres...

Help--Calendar Assistant won't install
My calendar won't print in the month view. I'm trying to install the assistant and get stuck when the message says "Outlook must be closed" It is closed, and I also checked the start-up menu. I've checked programs in the Control Panel and Calendar Printing Assistant isn't there. I'm using Visa, and Office 2007 Enterprise. Would appreciate help with this. Thank you. Sorry. Answered my own question. I finally after, say, 58 attempts to install this program, I opened Task Manager, and indeed, there were two OUTLOOK.EXE. files running in the backgro...

Help with CInternetSession
Hey everyone, hoping someone can give me a hand here as this seems a little backwards to me. Basically I am writing an application that uploads a file to my webserver (a static IP) using CInternetSessions and CFtpConnection. Now I've included the code I'm using below to illustrate what seems wrong to me (and probably is :( ). Basically I don't know/understand when I'm supposed to delete my sessions and connections (seems like I never call ::Close() probably not a good thing). If anyone can see what I'm doing wrong (remember I'm calling this chunk of code about every ...

Sign In stopped working -- Help
Live was working fine until 2/29/10. Now Windows Live mail Desktop will not send or receive mail. “Sign in” shows in the upper right corner. When I click Sign In (upper right) then “Sign in” box in the sign in pop-up I get “Sorry, we were unable to sign you in to Windows Live ID at this time. Please try again later”. I can access my mail on MSN web (Same address and PW). -- Ann from CA Oops - stopped on the 26th! -- Ann from CA "ann6709" wrote: > Live was working fine until 2/29/10. Now Windows Live mail Desktop will not > send or receive mail....

Search Form
I have read some help articles on sub forms, however, have yet to find the solution that helps me. Some groups have stated that this is not known, however I know there has to be an easy solution: I have a form that also has a subform. The two are linked by a field, [Eno]. When I add records, etc, everything works beautifully. However, If I wanted to search the form from a SUB-FORM field [EMPLOYEE] from the MAIN form, It will now work. I started the search with a unbound text box, - after update which will be the search terms, however, I am trying to figure out VBA code that will ...

Close Forms
I have a "Main Menu" switchboard style form that has numerous buttons that open forms. Each button opens a form, and each form has a menubar/toolbar that has a "Exit", "Main Menu", "Filter", etc. buttons at the top. Once I open a form and press the "Main Menu" button, the original form stays open. How can I close this form using this "Main Menu" button. I am not sure where the vba code would be. Thank You - Tim In the On Click event of the "Close Form" button, put 2 lines - one to reopen the Main Menu form and on...