Solved

insert value into readonly combo box with  hardcode

Posted on 2002-05-19
2
324 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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

624 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