Popup Custom Search Form, Can this be Done ?

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

I have for example a Invoice form where it has lots of records and I created
a unbound Combo select query drop down box.
If I choose a Invoice number, customer, or date , it goes to that record.
This works fine,except I would like to have it pop-up instead of being on
the form. I tried doing this via a pop-up form, but it didn't work.
The forms name is TimeCards and the combo name is Combo202 with it's row
source set to
The forms record source is a query named TimeCards and table source is Time.
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM TimeCards;

Can this be done from a pop-up form instead ?

Thanks,

Dave
 
I tried using this code with a pop-up custom search form,but it does not
work.However on the main form the same code works with the same combo box ?
I am Missing something ?
 
Your code line has the correct syntax. Is it a multiline code step in your
code; if yes, did you use the line continuation character so that the two
lines are connected as a single line of code?

--
Ken Snell
<MS ACCESS MVP>

Dave Elliott said:
I tried doing this, but I guess I did something wrong. The pop-up form name
is customersearch
The code wont compile, it says expected espression.

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] &

"'", , acDialog



Ken Snell said:
You wish to display the selected record in a popup form after you select the
value in the combo box on the main form?

Should be able to do this by creating the popup form, and setting its
recordsource to this:
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM
TimeCards;

Then, in the AfterUpdate event of the combo box in which you select a name,
use this code:
Private Sub cboBox_AfterUpdate()
DoCmd.OpenForm "popupformname", , , "[NameA]='" &
Me.cboBox.Value
&
"'", , acDialog
End Sub


--
Ken Snell
<MS ACCESS MVP>

Dave Elliott said:
I tried using this code with a pop-up custom search form,but it does not
work.However on the main form the same code works with the same combo
box
?
I am Missing something ?



I have for example a Invoice form where it has lots of records and I
created
a unbound Combo select query drop down box.
If I choose a Invoice number, customer, or date , it goes to that record.
This works fine,except I would like to have it pop-up instead of
being
on
the form. I tried doing this via a pop-up form, but it didn't work.
The forms name is TimeCards and the combo name is Combo202 with it's row
source set to
The forms record source is a query named TimeCards and table source is
Time.
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM TimeCards;

Can this be done from a pop-up form instead ?

Thanks,

Dave
 
Yes, it is a multiline code step. NameA and Repair Order Number


Ken Snell said:
Your code line has the correct syntax. Is it a multiline code step in your
code; if yes, did you use the line continuation character so that the two
lines are connected as a single line of code?

--
Ken Snell
<MS ACCESS MVP>

Dave Elliott said:
I tried doing this, but I guess I did something wrong. The pop-up form name
is customersearch
The code wont compile, it says expected espression.

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] &

"'", , acDialog



Ken Snell said:
You wish to display the selected record in a popup form after you
select
the
value in the combo box on the main form?

Should be able to do this by creating the popup form, and setting its
recordsource to this:
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM
TimeCards;

Then, in the AfterUpdate event of the combo box in which you select a name,
use this code:
Private Sub cboBox_AfterUpdate()
DoCmd.OpenForm "popupformname", , , "[NameA]='" &
Me.cboBox.Value
&
"'", , acDialog
End Sub


--
Ken Snell
<MS ACCESS MVP>

I tried using this code with a pop-up custom search form,but it does not
work.However on the main form the same code works with the same
combo
box
?
I am Missing something ?



I have for example a Invoice form where it has lots of records and I
created
a unbound Combo select query drop down box.
If I choose a Invoice number, customer, or date , it goes to that
record.
This works fine,except I would like to have it pop-up instead of being
on
the form. I tried doing this via a pop-up form, but it didn't work.
The forms name is TimeCards and the combo name is Combo202 with
it's
row
source set to
The forms record source is a query named TimeCards and table
source
is
Time.
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM TimeCards;

Can this be done from a pop-up form instead ?

Thanks,

Dave
 
Assuming that what you posted in the earlier message:

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] &
"'", , acDialog


is exactly what you have in your code, change it to this:

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] & _
"'", , acDialog

Note the line continuation character (_) at the end of the first line,
telling ACCESS that the next line is a continuation.

--
Ken Snell
<MS ACCESS MVP>

Dave Elliott said:
Yes, it is a multiline code step. NameA and Repair Order Number


Ken Snell said:
Your code line has the correct syntax. Is it a multiline code step in your
code; if yes, did you use the line continuation character so that the two
lines are connected as a single line of code?

--
Ken Snell
<MS ACCESS MVP>

Dave Elliott said:
I tried doing this, but I guess I did something wrong. The pop-up
form
name
is customersearch
The code wont compile, it says expected espression.

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] &

"'", , acDialog



You wish to display the selected record in a popup form after you select
the
value in the combo box on the main form?

Should be able to do this by creating the popup form, and setting its
recordsource to this:
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM
TimeCards;

Then, in the AfterUpdate event of the combo box in which you select a
name,
use this code:
Private Sub cboBox_AfterUpdate()
DoCmd.OpenForm "popupformname", , , "[NameA]='" & Me.cboBox.Value
&
"'", , acDialog
End Sub


--
Ken Snell
<MS ACCESS MVP>

I tried using this code with a pop-up custom search form,but it
does
not
work.However on the main form the same code works with the same combo
box
?
I am Missing something ?



I have for example a Invoice form where it has lots of records
and
I
created
a unbound Combo select query drop down box.
If I choose a Invoice number, customer, or date , it goes to that
record.
This works fine,except I would like to have it pop-up instead of being
on
the form. I tried doing this via a pop-up form, but it didn't work.
The forms name is TimeCards and the combo name is Combo202 with it's
row
source set to
The forms record source is a query named TimeCards and table
source
is
Time.
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM
TimeCards;

Can this be done from a pop-up form instead ?

Thanks,

Dave
 
You're welcome.

Dave Elliott said:
Thanks for your help.

Dave
P.S. Hope Family is ok.
My Best
Ken Snell said:
Assuming that what you posted in the earlier message:

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] &
"'", , acDialog


is exactly what you have in your code, change it to this:

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] & _
"'", , acDialog

Note the line continuation character (_) at the end of the first line,
telling ACCESS that the next line is a continuation.

--
Ken Snell
<MS ACCESS MVP>

Dave Elliott said:
Yes, it is a multiline code step. NameA and Repair Order Number


Your code line has the correct syntax. Is it a multiline code step
in
your
code; if yes, did you use the line continuation character so that
the
two
lines are connected as a single line of code?

--
Ken Snell
<MS ACCESS MVP>

I tried doing this, but I guess I did something wrong. The pop-up form
name
is customersearch
The code wont compile, it says expected espression.

DoCmd.OpenForm "CustomerSearch", , , "[NameA]='" & Me![Combo2] &

"'", , acDialog



You wish to display the selected record in a popup form after you
select
the
value in the combo box on the main form?

Should be able to do this by creating the popup form, and
setting
its
recordsource to this:
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM
TimeCards;

Then, in the AfterUpdate event of the combo box in which you
select
a
name,
use this code:
Private Sub cboBox_AfterUpdate()
DoCmd.OpenForm "popupformname", , , "[NameA]='" &
Me.cboBox.Value
&
"'", , acDialog
End Sub


--
Ken Snell
<MS ACCESS MVP>

I tried using this code with a pop-up custom search form,but
it
does
not
work.However on the main form the same code works with the same
combo
box
?
I am Missing something ?



I have for example a Invoice form where it has lots of
records
and
I
created
a unbound Combo select query drop down box.
If I choose a Invoice number, customer, or date , it goes to that
record.
This works fine,except I would like to have it pop-up
instead
of
being
on
the form. I tried doing this via a pop-up form, but it didn't
work.
The forms name is TimeCards and the combo name is Combo202 with
it's
row
source set to
The forms record source is a query named TimeCards and table
source
is
Time.
SELECT TimeCards.NameA, TimeCards.[Repair Order Number] FROM
TimeCards;

Can this be done from a pop-up form instead ?

Thanks,

Dave
 
Back
Top