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
1845 Views

Similar Articles

[PageSpeed] 7

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:

Selecting a Specific Record Form from a subform
I have a form with a subform that I want to select a field from and have it open another form with the data selected from the sub form. I was able to get the operation to work in the subform using the following: Under Parameters of the first field of the subform -- Open4Edit_StationInfo Open4Edit_StationInfo used the following command: FindRecord Find What: =[Forms]![Station Info Subform]![Call Sign] Match: Whole Field Match Case: No Search: All Search As Formatted: Yes Only Current Field: No Find First: Yes The above works when I run the form "Station Info...

OWA session Timeout (Form Based Auth )
Wondering if it is possible in Exchange 2003 SP2 to have different OWA timeout for different users using the same OWA HTTP VS to connect... If not, can a second HTTP VS on the same server as the first have different timeout, or is it a server setting ( I think it is done trough OWA web admin tool ) !!! Thanks !!! ...

Help building a filter on a form
Okay, I downloaded the Issue database template and simplified it greatly. Now, I can't get the "search issues" form to work. I have the following controls on my search form: Application (dropdown list) TextSearch (text field) I'd like to modify the existing code so that when I make an entry and click the "search" button, it will make the form footer visible (where the "browse_all_issues" form is imbedded as a subform). That part works. But, the next lines set the filter and turn it on... Me.FormFooter.Visible = True DoCmd.Mo...

how to active the ribbon Tab automatically when the form opens[Access 2007]
Dear I built a ribbon tab for a form. It works fine and when the form opening, the ribbon will be loaded fine. But it would be focus (or active) automatically. It still focus in the tab where I set now. Please help.!!urgent.!! Another question: is the callbacks for the ribbon always in Modules? I remember in Access 2003, the callbacks function could be in the form class modules. If all the callbacks should be in the Modules, does it mean we need distinguish which form or report is active now? Thank you very much. Jason Jiang Hi Ribbon is the new command bar system in office 2007...

Linked Forms
Hello, I am doing a project that requires two forms.. The first form contains the data for a business the second form contains data for the business owner... How do I link the two forms together...? Many thanks. Bob Send a common key piece of data from the first form (say the company name) to the second form page and include it in the second form as a hidden form field (then if using a database to store the results link with a relationship the 2 results tables by the common field) For form passing information see http://irt.org/articles/js063/index.htm -- ____...

Unbound Form for Criteria
Hi everyone, How can I make an unbound form pull criteria for: Month vs. Previous month Current Qtr vs. Previous Qtr Current Qtr vs. Previous Year’s Qtr I’ve been around the world and back again on this. Is it a matter of creating expressions for these in a form or should this be a part of the design of my query. My end result is to have a report showing one period vs. the other period and the variance. Please point me in the right direction…please! Thank you, Kay It will take more than an unbound form for the criteria to get your data. You will have to add a cal...

All help is worthy
I have set up a simple database in excel, using barcodes (i found this easier to scan and lookup, than access) plus the people working with this will find it simple to use. I have however reached a giant full stop. The database is pulled from Dave Peterson's update log worksheet, which works very well, the problems is that on a lookup sheet( using Vlookup ) where the user scans the barcode it will pull all info from the "database" sheet in reference to the barcode, ie: barcode number, surname,forename,address, early greenfees purchased,mid purchased,late. Is it possible to manipu...

Save n Refresh New Form
Hi All, I have use the 'Save' command button in the access2000. However, I need additional function when I click the 'Save' button. Click 'Save' - 'Yes' --> Save the data and then refresh into new form with the Log Number(Primary Key) increase to the next number No issue on the 'No' function. Pls help. Thank you. Private Sub SaveData_Click() On Error GoTo Err_SaveData_Click DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 Exit_SaveData_Click: Exit Sub Err_SaveData_Click: MsgBo...

timeclock report help
We use the timeclock report to print out total hours worked for any given two-week pay period. I am trying to modify the timeclock report by adding an additional column that will tell me whether the date on the report was in week 1 of the pay period, or week 2. I would like to return the string 'Week1' if the TimeIn value for that row is less than or equal to the FilterLoLim value + 7, but this does not work, i can't refer to this in my SQL formula. Any ideas?? Thank you, Kevin here is a simple select statement to demonstrate what i'm trying to accomplish: select cas...

File in 2007 form
I was trying the Beta Office 2007 and made the mistake of saving one of you Excel file in the new 2007 form. I really need it back in the 2003 form. Problem: due to a variety of issues, I de-installed the Beta version and went back to 2003 but for got about the one file.. So; are there any utilities that anyone knows of the will convert this file back two 2003 form?? It is a simple Excel file, meaning that there are no clever or fancy formula or macros, just a collection of parts and part numbers gathered over MUCH time surfing various web sites. Any help or advise (beside the obvious....

IF Function Help
How do I write a command that says: =if(a1=1&b1=a number, c1/d1,"na") How do I write the "a number" part? Hi Flutie99 Try: =IF(A1=1,IF(ISNUMBER(B1)=TRUE,C1/D1,"na")) -- Sincerely, Michael Colvin "Flutie99" wrote: > How do I write a command that says: > > =if(a1=1&b1=a number, c1/d1,"na") > > How do I write the "a number" part? If I am reading your post correctly you want a cell to equal C1/D1 when A1=1 and B1= some some number and for the cell to = "na" otherwise =if(and(A1=1,B1=xx),C1/D1,&...

Setting up a Form to be able to print
I have set up a form so as there are two pages (one after the other) on the form. When i view the first page of the form in Print Preview - there are two pages that i am able to print. However, when i print it out, only the "first page" of the Form prints. Any suggestions as to find out how to be able to print both pages of the form? You might try saving the form as a report, then adjusting the margins. Right-click on the form's name in the database window and choose: Save As then change the dropdown in the dialog to Report. -- Arvin Meyer, MCP, MVP http://www.datastr...

Publisher documents do not print. Help!
I just set up a new computer with an HP Deskjet 5440 and Microsoft Publisher 2003. Documents print perfectly from every software package except Publisher. Publisher documents don't print at all, even after I reinstalled the printer drivers. The entire document or just the pictures? If it is just the pictures, click the advanced print settings button in the print dialogue, graphics and fonts tab. Be sure "Do not print any graphics" is checked. Look on the HP site to be certain you have the most current driver. http://h10025.www1.hp.com/ewfrf/wc/softwareList?lc=en&cc=us...

urgent help!Identifying instances
I need to identify a particular instance opened in my desktop among multiple instances of EXCEL opened (may or may not contain EXCEL workbook)... How can I uniquely identify (Is there any progID or CLSID like thing entered into the registry? or is there any other means?) Please help -- Message posted from http://www.ExcelForum.com ...

Help please with junk e-mails
I have set up outlook 2000 to send unwanted mails to a folder names Junk e mails, I have copied below part of the outlook 2000 help file, can anyone tell me exactly where I can find add in filters as I cannot find them anywhere. You can also filter messages based on a list of e-mail addresses of junk and adult content senders. There are third party filters, which are regularly updated, that you can add to Outlook. These filters have the latest lists of commercial and adult content senders. For more information, see the Outlook Web site at http://www.microsoft.com/outlook. Thanks in advan...

Help in my VB Code .. to Delete
This is a multi-part message in MIME format. ------=_NextPart_000_0089_01C34629.B378D5B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi,=20 I have been trying to solve this problem since morning, and haven't = really come up with a solution. it is frustrating. please help. =20 i have a datagrid and got a delete column =20 <asp:datagrid id=3D"dgdocument" runat=3D"server" = AutoGenerateColumns=3D"False" EnableViewState=3D"True" = OnDeleteCommand=3D"DeleteCommand"> <Columns&...

Help Understanding Microsoft Server Products
Hi all We are looking to upgrade servers (currently running WinServer 2003) - new hardware and software. The Essential Business Server Premium pack appears to be ideal in terms of the software and package offered. BUT it appears that there will not be a version of this supporting Exchange 2010 for some months. This means we put a significant investment into 3 year old software, rather than catching the up-to-date flavour. So what's the difference between buying the EBS package and buying individual software applications separately? Also, is there additional software i...

help with range lookup and date criteria
Hello, I have a list of doctors (column A) that are each on-cal through a number of days. My argument is: if the date value of B1 an C1 is within the current date, then repeat the value of A1 -- James Spaldin ----------------------------------------------------------------------- James Spalding's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2567 View this thread: http://www.excelforum.com/showthread.php?threadid=39088 hi, James ! > ... a list of doctors (column A) that are each on-call through a number of days. > ... argument is: if the date value ...

Xpath Newbie Mistake, Please Help!
This code throws an exception when it should just print "C$" to the screen. What is messed up in my xpath? Thanks. test.cs: using System; using System.Xml; using System.IO; class XmlReadSimple { [STAThread] static void Main(string[] args) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.Load( Path.GetDirectoryName(System.Reflection.Assembly. GetExecutingAssembly().Location) + "\\test.xml" ); System.Xml.XmlNode xmlNode = xmlDocument.SelectSingleNode( "///[@path='c:\']/@name" ); Console.WriteLine(...

Creating a form
I have a form with a subform that allows a person to enter all the Sold to Ship To on the top form and the details on the subform.I would like to create a print button on the form that they can click after they finish entering the subform information that will print out a P.O. with all the top and subform info correctly placed on it.Is this very difficult? I am just not sure how it will know to print the current record?Thanks for your help After you add a button to the form to print a report, open the code module and modify the OpenReport method to add a where argument. Help and Intellisense ...

Mail Security
I am running Exchange 5.5 on Windows advanced server2K. From my Exchange server, logged in as Administrator, you can do the following: start->settings->control panel->mail....then change the mailbox user to anyone in the company......open MS Outlook and read their email... Is there a way I can prevent this from happening (even if only for my own mailbox) Thank you! If Administrator has the role of Service Account Admin on the site object, then this can happen. You wouldn't be the first person who used this account as the service account. You could change the service ac...

HELP: Need To Print Better Quotes
I am having a terrible time being able to print a good looking quote from MS CRM. it either prints the plain quote (Address, amount..etc) or i can print the product list (With no address, or nothing).. is there anyway to print a normal quote as others do where you can have the company informaiton and also all of the products that they are buying listed there? one would think that is the most basic feature that is not there.. don't you guys think? ANY help you can provide will be appreciated.. Thanks Quoteless In DC :-) Add a customized quote via Reports using Crystal. >-----Origin...

Cannot open Clip art in Publisher... Please Help?
When using Publisher, we cannot open the Clip Art. It has always worked from the side menu... Now nothing.... Please help. Open the Organizer from the start menu, Microsoft Office Tools, when the Organizer opens, tools, compact. Empty your temporary cache, in Internet Explorer, tools, Internet Options, delete files. If neither of these solutions work, do a "detect and repair" from the help in the Organizer. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "ATA" <ATA@discussions.microsoft.com> wrote in me...

Need help removing characters in multiple cells
I have an excel 2007 sheet that has over 300 cells in a column that have a name of a store plus a number between paranethesis. Is there a one step way I can remove the paranethesis? Here is an example: K-Mart (ABC#73846365) and I want to have just the following K-Mart Each cell has a different store name and set of numbers within the paranethesis. Thanks Select the range to fix. Edit|replace what: _(* (spacebar, open paren, asterisk) with: (leave blank) replace all It looked like you'd want to remove the space character after the t in k-mart. "<----- Mardm...

Help with Date/Time Function
I am working with date/time functions trying to figure out how many hours were spent doing a job. I have a start time and a finish time. But I need to subtract out any time between five pm and six am and weekends from the times. These would be times that no one was actually working on the job. For example I have 4/5/2005 18:23 4/6/2005 17:04 Could someone give me a clue as to how this might be done? Thanks, Steve Monczka smonczka@hotmail.com It's not a trivial thing, here's an example http://www.cpearson.com/excel/DateTimeWS.htm or here http://tinyurl.com/cbphn -- R...