473,385 Members | 2,005 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,385 software developers and data experts.

Opening Form and Moving to Selected Record

Hi friends,

I want a script that will move a form to a chosen record.

Here's what I'm trying:

I get the parameter from la different form using Docmd,openform using openargs

I've been trying docmd.gotocontrol followed by docmd.findrecord, but I keep getting complier errors. Here's my code:

Expand|Select|Wrap|Line Numbers
  1.    If Len(Nz(Me.OpenArgs, "")) > 0 Then
  2.     DoCmd.GoToControl "MemNo"
  3.     DoCmd.FindRecord OpenArgs, , , , , acCurrent
  4. End If
  5.  
It crashes on the first DoCmd command.

Please help.


Dante

(note that 'DoCmd.OpenForm stDocName, , , stLinkCriteria will not work for this application. That limits the records in the form to those meeting the criteria; I need my user to be able to access other records. )
Dec 16 '08 #1
4 1790
missinglinq
3,532 Expert 2GB
Where is your current code placed?

Linq ;0)>
Dec 16 '08 #2
Hi Linq,

This code is in the OnLoad of the destination form.

Here's the whole thing:

Private Sub Form_Load()
If Len(Nz(Me.OpenArgs, "")) > 0 Then
DoCmd.GoToControl "MemNo"
DoCmd.FindRecord OpenArgs, , , , , acCurrent
End If
End Sub


Thanks Linq.
Dec 17 '08 #3
Call off the dogs!

Now it works, and I know why.

Thanks anyway Linq and all others who''ve tried


Dante
Dec 17 '08 #4
missinglinq
3,532 Expert 2GB
Glad you got it working! Forum etiquette, here and elsewhere, dictates when the original poster solves the problem "off-line" that they post the solution. That way, others with similar problems, who come searching and find the thread, can also be helped.

Linq ;0)>
Dec 17 '08 #5

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

Similar topics

0
by: Glenn | last post by:
I have a list of records in a third party grid: when an item is selected, a user control (bound to a control module level dataset) is filled with the selected record. I have another form with a...
4
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a form with multiple pages on it. There is one text field on the third page of the form that I need the user to complete before leaving the form or moving...
3
by: Earthling | last post by:
Any help would be appreciated to solve the following simple problem that I will describe. *** There is a form called "red chocolate form". The form has a particular subform field that has a...
2
by: Lyn | last post by:
Hi, I am working on a genealogy project in which I have two tables: Person -- one record for each person in the family. Each record has a unique Autonum field (IDPerson). Partnerships -- one...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
12
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can...
1
by: Coll | last post by:
I have a form with a subform on it. On my main form, you select an employee id number and the top portion of form fills in with data, and the bottom portion of the form,which is a subform, lists...
1
by: gshawegypt | last post by:
Hi.... Using Access 2003.. I need help with the following... I have a form with a series of option combo's which as selected, filter data to the end chose.. I would like to record the...
4
by: limperger | last post by:
Hello everyone! Just in case anyone here has experienced this problem and knows how to deal with it: I have 2 forms from 2 related tables. We have more than 600 records in the first one and of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.