FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WEBDEV 2024
→
Dynamically Populated Combo Box
Dynamically Populated Combo Box
Iniciado por Carlos Antunez, 12,sep. 2014 21:41 - No hay respuesta
Conéctese…
Carlos Antunez
#1
Publicado el 12,septiembre 2014 - 21:41
Hi and thanks in advanced for the help.
I have the following:
1 query Name qryCustomers
Fields for qryCustomers are: Cust_Name, Cust_Address, Cust_Zip_Code.
1 query Name qryZip_Codes
2 edit controls are linked to the qryCustomers query (Cust_Name) and (Cust_Address) then a combo box is linked to the Cust_Zip_Code field of the same query qryCustomers.
When I run the site and open the page, I dynamically populate the combo box with zip codes obtained from a parameter qryZip_Codes query I run. The combo box gets filled perfectly and it displays all the queried Zips.
I enter a new Customer Name, Address and I can select a Zip from the populated combo box without any problems, but when I save the record which by the way is not coming from a table, it saves the Customer Name and the address, but it won't save the zip code under the linked ZIP_CODE field, the next time I visit the same record I just saved, the Customer Name and Address are there but the combo box doesn't hold the Zip Code value I picked when I created the Customer.
This is the code I have on the initialization of the Combo Box
HExecuteQuery
(
qryZip_Codes
,
hQueryDefault
)
HReadFirst
(
qryZip_Codes
)
ListAdd
(
""
)
WHILE
NOT
HOut
(
qryZip_Codes
)
ListAdd
(
COMBO_
Zip_Code
,
ZIP_CODE
)
HReadNext
(
qryZip_Codes
)
END
This is the code I have on the Save Button
IF
YesNo
(
Yes
,
"Are you Sure that you want to Save this Customer Now?"
,
"Please Confirm"
) =
Yes
THEN
PageToFile
(
PAGE_
New_Customer
)
HModify
(
qryCustomers
)
END
Thanks for the help
Best regards,
Carlos
Informar
0
0
→ Volver a WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto