Solved

insert value into readonly combo box with  hardcode

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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now