473,657 Members | 2,538 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto populate field based on recordset and coding

BK
Hi,

I have a problem. I need to auto populate fields based on a value
entered in combo box. Initially, I put all the required fields in the
combo box, and hide it (set to 0",0",0", ...), then use code:
Name=cbBox.colu mn(3) to get the value.

It works fine, but I have problem with performance. The source of the
combo box is a table from another database that keeps adding up
(currently we have around 1500 records, around 5-20 new records per
day). The form that use combo box is very slow if doing it that way. I
tried to do something else, with codes mostly, but it doesn't work.
Here's my code:

Private Sub cbJobList_After Update()

Dim strSQL As String
Dim rs As Recordset

strSQL = "SELECT * from tblJobTicket WHERE JobJacketNo = " &
Me.cbJobList
Set rs = CurrentDb.OpenR ecordset(strSQL ) '<--gives me data type
mismatch

Me.ComboNo = rs("ComboNo").V alue
.......

End Sub

Mostly it gives me datatype mismatch. If I autopopulate the fields
from the codes instead of from the combo box, would it be faster? This
code works fine on the other database, but not mine. Please help. I'm
not very familiar with coding but I'm learning (have to).

Thanks for any help/advise.

BK
Nov 12 '05 #1
0 2025

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2274
by: David Shorthouse | last post by:
HI is it posible to auto populate an access database.? I have 1 table structured Index_ID. - Index & auto number First_Name - Char50 Surname - Char50 Initals - Char50 Postcode - Char50 Email_Address - Char50 Mailshots - tick box
2
10384
by: MVA | last post by:
Hi all I have a database where in a table (tbl_Members), there are 2 date fields (DateOfBirth and DateJoined), and also 2 fields which upon entering the data in the form, it automatically works out the Age (in years) and number of DaysJoined (in days). It works fine but it does not automatically update the Age or DaysJoined columns on opening the form. Can anyone make a suggestion as to how I could say, open up the Switchboard frm,...
0
394
by: sienayr | last post by:
Greetings, I have searched hi and lo through the groups and haven't found my problem specifically. I have listed below what I have tried based on what I have found in the groups. Please let me know if what I am trying to do is even possible; if it is, any insight is greatly appreciated. I am building an ADO recordset from an SQL server, connection properties as follows (coding in VBA/A2K):
3
4105
by: Kevin Rollo | last post by:
I'm playing with a generic routine to export data, the concept is to have a list of data driven templates defining what fields to output. Evaluating a simple variable field name in the function is easily achieved by something like dim rst as dao.recordset .... strField = "Amount" debug.print rst.fields(strField) ' or just rst(strField)
1
2351
by: Jim | last post by:
I have a new database in which I have a form where in one field I type a letter A, B, C or D and the field next to it autofills (auto lookups) with a description associated with the specific letter. If I edit the description for one record, it edits the same for all records in which I've applied the same autofill (auto lookup). I'm set up where the letters come from a lookup combo box (limit to list "Yes") and the record source for the...
3
3612
by: jacklindsay | last post by:
Hello smarter people than me I am creating a database for college, and have requested some help, but they are unable to help me. ( im obviously too eager) anyway, im creating a database on computer components and peripherals (i.e networking devices, hard drives etc etc), the previous mentioned devices are in a table called product catagories which in the form, are a drop down. I also have 2 text box fields, 1 is for the product...
5
17677
by: joshua.nicholes | last post by:
I have an access database that consists of two tables.A data collection table and a species list table. The data collection table has about 1500 records in it and the species list has about 600. The species list has 7 fields the first is a four digit unique identifier (species) it is set as the primary key. I have created a relationship to the data collection table which also has a species field (4 digit id). In my form I have the species...
4
13953
by: whamo | last post by:
I have the need to populate a field based on the selection in a combo box. Starting out simple. (2) tables tbl_OSE_Info and tbl_Input; tbl_OSE_Info has three fields: Key, OSE_Name and OSE_Wt tbl_Input has three fields: OSE_Job, OSE_Name, OSE_Wt I have populated tbl_OSE_Info table. I need to create a form that will store the data in tbl_Input I have racked my brain so much trying to figure out how to auto populate a field based on a...
5
2005
by: lindabaldwin | last post by:
Hi, I am having a really difficult time with this, so any help is very much appreciated. I have created a form with two subforms. The parent form includes patient data. The first subform contains appointment data. The second subform contains delivery data. The three tables are linked by member record number. I have two problems that I have been trying to figure out for weeks! The first is that I want the two subforms to populate...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7352
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.