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 7494 articles. 0 followers. Follow

6 Replies
923 Views

Similar Articles

[PageSpeed] 21

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:

password popup
HI, I'm using Outlook 2002 and every time i open it password window pops up. I tried everything. I changed my password with ISP, i went to the settings and verified name,password and every imaginable combination i could think of. i even went to security settings and set my privacy to low and i still get the same password pop up.Any help would be appreciated. Thanks Check you connection settings. Are they set to manual? If so, it will prompt you for your password. Check under tools email accounts and be sure the connection type is set to automatic Vickie >-----Original Messa...

Form design (Newby)
Hi, I'm real new at this and hope someone can help. I've made a form using Form Wizard, then changed the format to suit myself. The form controls come from one main table which is linked to several others. Trouble is that the form won't accept any information or even show its fields in the detail section of the form. What am I doing wrong? Thanks in advance. On Mar 18, 7:58 pm, "Lowlevldevl" <Don_Bla...@hotmail.com> wrote: > Hi, > I'm real new at this and hope someone can help. I've made a form using > Form Wizard, then changed the format to suit ...

Handling Popup Menu Commands in Parent ?
Hi guys, I have a CWnd-derived child window that has a popup menu (when you right click), I want to handle some (not all) of those menu commands in the parent. I can get the parent to handle them by using GetParent() in TrackPopupMenu() but then the child can't handle any. If it's a big pain I can handle them all in either the child or the parent but maybe it's pretty easy to do ? Thanks. R. I did it like this: // My Cwnd-derived custom view BOOL CLayoutView::OnCmdMsg(UINT nID,int nCode,void* pExtra,AFX_CMDHANDLERINFO* pHandlerInfo) { // let child have first crack at ...

Form Restore Problem
Hi All, hope someone can help me with a problem I haven't been able tofigure out or research the answer for. I have created "restore" and"maximize" functions for my forms in previous databases and they workgreat, but for some reason they are not working correctly in adatabase I am now working on. In the "Activate" event of the forms, Ihave used the following code, DoCmd.Restore. When I pull up the formin the database, it restores correctly, but when I call up the formthrough the Switchboard, it always maximizes. As to the Switchboard,I have checked the cod...

Receiving Landed Cost
Forgive me, but this is my 2nd post on this topic. I was unable to get a workable replay. GP 9.0 SP2 When I receive a PO I can not enter Landed Costs ID in the Landed Cost window. When I select the 1 Landed Cost ID and tab over to next entry, the 1st one disappears. When I do the same proceedure in the test company (Fabrikam) I have no problems entering multiple landed cost ID. Landed Cost module is registered and shows as active Any suggestions as to what the problem may be. ...

Using bookmarks to select a record after form requery
I have a continuous form in an ADP linked to a SQL view. The view contains both ordering and filtering. The form is designed to display invoice lines... Some items in the invoice are grouped under a parent, and the parent line denoted by a field itemParentID, pointing to the primary key of the parent line. One field on the form is a price. When changing the price on a part which is from a group, the overall price gets updated, and vice versa. This happens in a stored procedure. What I want to happen, is that in the OnExit event for the price text box, the stored procedure is called, the form...

Restore Custom Forms in Organizational Forms
Hi, running Exchange 2003 SP2 on Windows Server 2003 SP1 backup up with Veritas Backup Exec 10d. We have some custom forms placed in the Organizational Library. Some have been deleted - how can they be restored from backup? The rest of the Org forms are OK. I do not have an Outlok PST backup of these forms - just what Veritas BE backs up. Thanks in advance! Organizational forms are in the public store, so you'd have to restore the public store before they were deleted to a recovery server, connect to it with Outlook, and get the forms. I believe that you should be able to connect ...

VB to Access form
To save a lengthy reinvention of the wheel, does anyone have a program to convert a VB form into an access form please. About six years ago, I wrote a VB6 program to convert an AS/400 screen format into a VB6 form. Once I found that Access was much easier to distribute than VB6, I modified the program to create an Access form. I would need to look in the VB form that I was converting for what I had output in the first of my programs and then do the corresponding action from the second program. This is why on this occasion I would rather pick someone else's brains if possible. M...

Calculations on Form bound to a field in a table
Is possible to perform calculations in a field and have them stored in a table? For instance I have a call log form where users enter different types of calls that they recieve. the fields that they enter are bound to a table that tracks the calls. I can place formulas in the form that display the totals of the different calls. Can I have those totals bound to a field in my table? If the numbers that make up the calculation are already in the table, then you don't need to also store the total. It is redundant. When you need the calculated value, just calculate it. It is more...

Creating a form / card
Hi there. Was hoping someone could help, been trying for ages. All I want to do is remove all the excess cells and space from my work-sheet so that I get a nice tidy form / card. Thanks so much. Dan -- dhunter84 ------------------------------------------------------------------------ dhunter84's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=33373 View this thread: http://www.excelforum.com/showthread.php?threadid=531997 Dan, you can't remove them but you can hide them, select the rows you want to hide and format rows hide, do the same for the columns...

grocery needs help with reports and drawer seperation
my computer support tells me, I cannot seperate totals for reporting on my seperate drawers. I have two registers, two drawers each. I am trying to allow staff to sign on individually, but then I can't x and z without their codes. Also when generating reports for detailed drawers, It shows what is rung up, but not tendering (i.e. how much to expect per drawer in credit cards) We are guessing. Finally, when putting a customer purchase on store account, it appears the sale is final as of that day. When accounting tries to match totals and that person doesn't pay for 30 da...

Linking Parent Form to a Child Form
I have two forms. One is Parent Information and One is Child Information. When I am editing an existing record in a Parent Information, I would like a button to take me directly to the parent's child in the Child Informaion. Also, when in Parent Information, when I enter a new record, I would like a button to take me to the Child Information to add a new record. Is this possible. Your help is much appreciated. Thank you. "debbiep@ywcaofjamestown.com" <debbiep@ywcaofjamestown.com> wrote in news:1191085309.369780.189680@d55g2000hsg.googlegroups.com: > I have two form...

Need Help with Error Message #2
I have Pocket PC 2002, the latest version of ActiveSync (3.7.1), and Office 2003 (Outlook 2003). Ever since I upgraded to from Office 2002 (Outlook 2002), I can no longer synchronize with my desktop PC. When I try to, here is the error message I get: "Microsoft Outlook is no longer installed, so ActiveSync cannot continue to run. To continue synchronization, reinstall Microsoft Outlook. If you no longer want to synchronize your data, disable synchronization in ActiveSync." I reinstalled Outlook 2003 AND ActiveSync, but no luck. Is Pocket PC 2002 incompatible with Outlook 2...

Form base authentication
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C6EA59.0F01C140 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable This is killing me. I'm implementing form base authentication. I have = SSL and everything working but for one problem when use won't to get to owa they type mail.domain.com which then = defaults to http://mail.domain.com. the problem I'm having is that FBA need it to default to https not http. = How can I get it to default to HTTPS with out telling the uses to type = https? wayne ....

Tranferring email files form one PC to another
I realize that this question has been asked a thousand times before and I should have paid attention. . I have copied all the files with the *dbx extension to a memory stick. How do I get them from there into the Local Folders of the new PC. TIA, Hagen Sahm Assuming this is OE to OE? Did you include Folders.dbx? If yes: Backup & Restore: http://www.insideoe.com/backup/ Backing up and Cloning your OE Identities: http://www.insideoe.com/backup/clone.htm If you did not include Folders.dbx, you have some work cut out for yourself. How to restore individual dbx f...

No Current Record on form close
I think I know what's causing this but not how to fix it. I have a subform tied to my main form and when I close the main form when the subform has no records, I get a "No Current Record" error (no error number, just the text). When I close my form and the subform has associated records, everything is fine. How can I bypass or prevent this dialog box from appearing when I close a main form with no related records in the subform? Thanks! When you close a form with a SubForm, the MainForm closes 1st and then the SubForm will close. Do you have some code in the OnClose or ...

Index Function Help
Can any one can help me to solve this I don’t know why I get error #value next to Reference in the Index Function argument window =INDEX((A1:C6,A8:C11),2,2,2) even I got the error the result comes back ok but with one area selected there is no problem Thanks in advance Anna Your function will work as posted. If A1 thru C6 contains: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 and cells A8 thru C11 contain: 19 20 21 22 23 24 25 26 27 28 29 30 the formula correctly returns 23. You will see an error if cell B9 contains an error. -- Gary''s Student - gsnu200784 "anna&q...

Reset Tab Order on Template Contact Detail Form
I have edited the design of the Contacts Detail Template form. How do I reset the tab order to start with the new text boxes I have entered? In Design View I selected all of the text boxes, selected Tab Order, and for the template only "tabContacts appears for the Tab Order rather than the list of text boxes in the tab order. The new items I added are on the list, but in order to make the form work, I had to move them to the top of the form. When I return to form view, select Save and New, the tab goes to my new tab "Category1" then "Category2", then it goes to...

Formula Help! #3
Hi, I need to transform a date to week date , for example: 10/11/05 to Tuesday Is there any formula can do this transform? Thanks in advance -- Meme Hi! Try this: A1 = 10/11/2005 =TEXT(A1,"dddd") This returns a TEXT value = Tuesday OR, you could just format the cell, A1, as dddd. This retains it's numeric value but will display as Tuesday. Biff "Meme" <Meme@discussions.microsoft.com> wrote in message news:64B1FB51-4EC0-42DC-97B9-B788A9586811@microsoft.com... > Hi, > > I need to transform a date to week date , for example: > 10/11/05 ...

Outlook 2003 Forms Problem
Whenever I try to open or design a form, Outlook keeps asking me to open another data file. It appears as if it thinks the default library is in another (older) data file. I have tried clearing the forms cache, renaming frmcache.dat, etc. Nothing works. Can anyone help? Thanks. What is the exact text of the error message?=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jump...

Popup required
For a longish macro (made up of a few smaller macros), what is a simple way of displaying a message box saying "operation in progress, etc", and then when the macro has finished, another message box with an OK button saying "operation completed"? For the first requirement, just create a UserForm with the appropriate message on it (I use one called 'frmWaitMsg' that just says "Building Document - Please wait...") and make sure its ShowModal property is set to false. This will allow code to run while the UserForm is displayed. Show the f...

Modifying Forms
Is there a way to relabel the label colors on the Appointment form? Do you mean to modify them or what? Modifying the label names is very easy. Right click on an appointment->Label->Edit Label. I presume you are using Outlook 2002 or 2003, correct? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Cindy MIkeworth asked: | Is there a way to relabel the label col...

move data in one form to another after calculation
OK, this is what I have. I have a main form that I put patient info into. On that form I have a button that brings up a 2nd form for weight conversion. The 2nd form consists of 2 fields and a return button to go back to the main screen. I have the conversion working, but not the moving of data from the 2nd form back to the first form. I have tried adding ' [Forms]![Patient]![BirthWeight] = [Text1] / 2.2046244' to the afterupdate action on the 2nd form 1st field. This alas does not work. TIA I'm not understanding why you need a second form. I'm not clear what you want to...

Function Help #4
Is there a way I can use a function that will change the colour of required cells to say, red?? e.g. using the IF, if two cells do not have the same value a selected cell will change colour to red, to act as an alert. There is a way: check out conditional formatting in the Help feature. <Format><Conditonal format> is good for this formula is =C1<>D1 and set format as you want it. "Stuart" wrote: > Is there a way I can use a function that will change the colour of required > cells to say, red?? e.g. using the IF, if two cells do not have the same &g...

How to support clickable URL in the balloon popup from systray icon
Hi, I am working on a project which creates a sys tray icon and occasioanlly pop up ballooon message. The project is in VC++. As per our product requirement, this pop up should support clickable URLs as well, to which I am facing difficulty. I tried adding href tags to the URL, but it is showing up as plain text. Is there any way by which I can support this feature. It would be of great help, if anyone can suggest me a solution to this. Thanks in advance, Anu You will have to display the balloon yourself. Here is a an example that does have link capabilities built-in http://www.codeprojec...