Solved

insert value into readonly combo box with  hardcode

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

679 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