473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using a variable for find record method.

Ok what I have is a list of boxes on a form that are connected to fields in my database. There is an extra box I want to be able to put the record number in and it automatically load the data corresponding to that record in the associated boxes. When I have the form running I can go to the editmenu in access and use find(ctrl+f) type in the number and it works. I know it has something to do with the DoCmd.FindRecord method. I tried using DoCmd.FindRecord cboBox,,True,,True and that doesnt work. I need some serious help on this, Thanks in advanced.
Jan 18 '07 #1
2 3899
Actually maybe this will make it easier but I still cant figure out how to do it. I have a form that has a subform of a query(named query_1). On that form is a search button with filters. What I want the program to do is after the search is done, you can highlight one of the records then click my add/change delete button, which brings up a form with the corresponding txt boxes, and it brings up the information of the highlighted record in those text boxes.
Jan 18 '07 #2
cyberdwarf
218 Expert 100+
Hi

Try using:-
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm FormName, ,, WhereCondition,acFormEdit 
'WhereCondition' would say something like:-
Expand|Select|Wrap|Line Numbers
  1. "RecordID = " & Me.RecordID
where the recordID comes from a combobox, or whatever..

HTH

Steve
Jan 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: N. David | last post by:
In bash, you can include a variable as part of a filename. For example: date=$(date) cat log.txt > $date"_log.txt" Which, when setting the right options in date, creates a file named...
6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
6
by: rJ | last post by:
hi, what does the following statement mean and what does it do? Dim obTest As Record.Class1 = CType(Class2.GetSessionInfo(class3.TestConstant), Record.Class1) GetSessionInfo() simply does...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
5
by: njb35 | last post by:
Hi all I'm beginning my foray from VBA into VB 2005 Express, and enjoying some of the efficiencies it provides! I'm stuck with some dataset handling however that I _think_ can be automated but...
10
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
7
by: kpresidente | last post by:
Hello all, I'm trying to transfer the value of a control on an Access form to an Excel worksheet using VBA. The Access form is a single form with all the controls disabled, so that data is "read...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.