Question about Computers & Internet

1 Answer

How to write a code of a combobox

Source code for inserting different types of properties in php

Posted by on


1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert that hasĀ over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 6 Answers


Try this code:

Combo-BOX - Abstraction With function you can retrieve the combo-box
structure with its data
function GetCombo_Where($db, $nombre, $tabla, $campo_lista, $campo_graba,
$query="SELECT * FROM $tabla ";
$query.=($where)?"WHERE ".$where:"";
$db -> query ($query);
$cant_registros = $db -> num_rows ( );
$string = "<select name=".$nombre.">";
if ($seleccionado=="")
$string .="<option></option>";
for ($i=1;$i<=$cant_registros;$i++)
$db -> next_record ( );
$value = $db -> Record[$campo_graba];
if ($valor_seleccionado == $db -> Record[$campo_seleccionado])
$string .= "<option selected value = ".$value." >";
$string .= "<option value = ".$value." >";
$string .= $db -> Record[$campo_lista];
$string .= "</option>";
$string .= "</select>";
return $string;
hope this helps.


Posted on May 08, 2009


1 Suggested Answer

  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

a 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
New users get to try the service completely Free afterwhich it costs $6 per call and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.

Posted on Jan 02, 2017


Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

I have a CY25 with a DVD SBW-241 that will wite CD's but not DVD's

Step 1:

make sure your dvd burner is on.for xp:

1. Click on the "Start" button and then click on the "My Computer" option. Right click on the DVD drive from the list of drives.

2. Click on the "Properties" option and the "DVD Drive Properties" dialog box will appear on your screen.
3. Click on the "Hardware" tab and then click on your DVD drive. Click on the "Properties" option below the "Device Properties" heading.
4. Click on the "Driver" tab and then click the "Enable" option. Click on the "OK" button to save your changes.
5. Insert the DVD you want to burn into your DVD drive and a dialog box will appear on your screen with the option to burn the DVD.

Let me know if you need it for another OS

Step 2:

figure out if it can read DVD. If it can, your burner or disc is having the issue

Step 3:

make sure you're using the right type of dvd. (dvd-r vs. dvd+r).

Step 4:

use a different dvd and if possible from a different source or brand. if it burns then that particular cd is faulty or computer has difficulty burning from that particular source or brand of dvd.

Step 5:

if you're still having issue, it maybe your burning software. Try a different one. I know that windows 7 and beyond have one and there are trials for dvd burners online.

Feb 15, 2013 | Fosa CY25 Laptop

1 Answer

Insert tray 1

You can set the default paper source for all print jobs. Tray 1 is the default factory settings, only an installed paper source will appear as a menu setting. A paper source selected by a print job will override the Default Source setting for the duration of the print job. Check the word processor print settings, make sure that it matches with the printer paper menu settings. To do this you may click print and click on properties button. Click on the paper tab and you can set the input options like paper size, paper tray (source) and paper type.

For further assistance, please call Lexmark Technical Support.

Jul 26, 2011 | Lexmark C510 Laser Printer

1 Answer

Color issues

right click on desktop
click properties
at the settings tab you have color quality combobox
select the highest (32 bit)

Jul 17, 2009 | Computers & Internet

1 Answer

How to shortlist combobox items at runtime ?

Each time a letter is typed by your user, re-query from the 50 and return ONLY those meeting what your user typed. Clear and re-populate the ComboBox. Also - Set the Sorted property to True!

Mar 30, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

Hi, I just wanted to short list combobox items at runtime. It means if i type "A" i.e. the first letter of name, it should short list name field for names starting with letter "A". Afterwards when i type...

Each time a letter is typed by your user, re-populate the list from a data source (array or database table, etc). The intrinsic ComboBox does not have built-in functionality for this.

Mar 28, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer


look this:
You'll get all your answers there, easily

Feb 12, 2009 | Computers & Internet

1 Answer

How to add items in combobox using database in vb6.0

There are 2 ways:-

you can set the recordsource in the properties for the comboBox to a table or create a recordset and loop through it adding one item at a time, see example below:-

Dim dept As String
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim qd As DAO.QueryDef
Dim varResults
Dim oMessage
Dim sQueryName As String
Set db = CurrentDb
dept = formname[Form_Name].Department.Text
sQueryName = "Query_Name"
Set qd = db.QueryDefs(sQueryName)
' set up input field for query
qd.Parameters("field_from_query") = dept
Set rst = qd.OpenRecordset()
Dim recCount As Integer
recCount = rst.RecordCount
If recCount > 0 Then
With rst
Do While Not .EOF
listBoxproducts.AddItem .Fields("pname")
listboxCode.AddItem .Fields("pcode")
listboxPrice.AddItem .Fields("pprice")
End With
Set rst = Nothing
Set qd = Nothing
Set db = Nothing

Jan 13, 2009 | Computers & Internet

2 Answers

PHP Source


i would like to tell that the php code doesn't appear when you open the source of the webpage , the server hides the php codes simply ,

thanks !

Sep 03, 2008 | The PHP Group PHP

1 Answer

View Reports

Hi, There a couple of different way you could do this and I have put two lots of VB code below that you can modify and use. Firstly you create the Combobox list by choosing the option that you will type the values yourself, you then type in all your report names on each line. After that you can then go to the VB code editor and paste my code in and modify it by changing my report names, (Customers) etc to your report names. Make sure you choose the Combobox and the On_Click option in the VB editor to paste the code into.  I like the first method better which checks the value of the Combobox and then opens the corrosponding report in the maximised form. The second method does the value check before running an assigned macro to open each report. With this you must first assign macros to each report in Access.  Remember each of these bits of code must be placed between the "Private Sub" heading and the "End Sub" ending, and change the "Combo23" name to reflect your combobox too. If you need a hand just email me.

First Method
If Combo23.Value = "Customers" Then
    DoCmd.OpenReport "Customers", acViewPreview, acWindowNormal
ElseIf Combo23.Value = "Customers 1" Then
    DoCmd.OpenReport "Customers1", acViewPreview, acWindowNormal
ElseIf Combo23.Value = "Customers 2" Then
    DoCmd.OpenReport "Customers2", acViewPreview, acWindowNormal
End If

Second Method
If Combo23.Value = "Customers" Then
   DoCmd.RunMacro "Macro1"
ElseIf Combo23.Value = "Customers 1" Then
    DoCmd.RunMacro "Macro2"
ElseIf Combo23.Value = "Customers 2" Then
    DoCmd.RunMacro "Macro3"
End If

Oct 28, 2007 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

98 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers


Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides