Solved

insert value into readonly combo box with  hardcode

Posted on 2002-05-19
2
314 Views
Last Modified: 2006-11-17
Hi gurus...

i tried transfering a record from one table to another with a query. this worked on my network prototype, but unfortunately would not work on my clients application.
my guess becuase of many querys that the front end uses before inserting the values into the table.

So..i have decided to insert the values from the record in the table directly into the form fields..

This code below allows me to insert a value into the textfield of the form. i had to disconnect the control source, so that i could hard code a value into it..

request = "hello gurus"
Me.Request.ControlSource = "" 'disconnect the readonly
Me.Request.SetFocus 'set focus before insert can occur
Me.Request.Text = Request

problem!!!
i want to do the same for the combo box, but the same code will not work and i have tried disconnecting the controlsource, recordsource e.t.c.

Me.Request.ControlSource = ""
'Me.Request.RecordsetType = ""
Me.Request.RecordSource = Null
Me.Customer.SetFocus
Me.Customer.Text = Customer

any ideas???
0
Comment
Question by:woollar1
2 Comments
 
LVL 12

Accepted Solution

by:
Paurths earned 100 total points
ID: 7020884
hi woollar1,

here is an example of populating a combobox (cboBox)

Dim strVal As String

Me.cboBox.RowSourceType = "Value List"
Me.cboBox.ColumnCount = 1
strVal = "value1;Value2;Value3"
Me.cboBox.RowSource = strVal
Me.cboBox.Requery


cheers
Ricky
0
 

Author Comment

by:woollar1
ID: 7020973
cheers...works fine
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question