Solved

insert value into readonly combo box with  hardcode

Posted on 2002-05-19
2
320 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

738 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