Change Record Showing In Form

Dec 14, 2005

Hello,

I have another question about ACCESS forms. With VBA, I want to change the record showing when I open a form.
I see there is a member "CurrentRecord" so I tried in the class module

Me.CurrentRecord = 2

I compiles but gives runtime error that is write-protected and cannot be changed. In the ACCESS help I read you could do it but HOW?

What should I do ( I am using ACCESS 97 ) ?!

Thanks in advance

Victor


PS : Is it true that VBA in newer versions of ACCESS has more features/functions etc?

View Replies


ADVERTISEMENT

Forms :: Double Click Event - Form Showing 1st Record Instead Of Selected Record

May 8, 2014

I am new to access and I recently encountered a double click issue

My form loads perfectly on double click event but it shows the first record instead of selected record.

My search is based on a PersonID but each PersonID has different WorkID that I wish to display on double click but it always shows the first WorkID instead of my selected record

I have tried changing the filters in the form properties but it still doesn't work for me.

Here's my code:

Private Sub SearchResults_DblClick(Cancel As Integer)
DoCmd.OpenForm "WorkForm", , , "[PersonID]=" & Me.[Searchresults], , acNormal
End Sub

[Searchresults] draws information from my Query

Query information:

PersonID... WorkID... Type......Location
1234..........1............Paint .....Address A
1234..........2............Electric...Address B
1234..........3............Floor..... Address C

View 7 Replies View Related

Second Form Showing Same Record As First?

Mar 22, 2005

Hi,

I have a main form that displays records with a couple of sub forms and it also has a button to open another form which is based on the same table main table but different sub forms.

All I am trying to do is open the second main form by clicking the command button and to automatically display the same main record as shown on the first form before clicking the button.

Sounds simple but I can't find how to do it.

Any ideas appreciated........Stuart

View 1 Replies View Related

Open Form Showing New Record Only

Mar 28, 2006

Hi all,

Is it possible to open a form so that it shows the new record fields only? I want to create a form that only allows the user to enter data and not view any of the records in the table the form is linked to.

Cheers,

Matt

View 1 Replies View Related

Disable Showing New(empty) Record In A Form??

Apr 29, 2005

Hi,

I am currently working on a database and I'm using a form to view the records. A standard Access behavior is to show an empty record (new record) as the last one. is there a way to disable this "feature". I would like my form to display only the records, which are really filled with data and not show the blank one at the end??

Thanx in advance
Luke

View 3 Replies View Related

Missing Record - 325 In The Table, 324 Showing On The Form???

Sep 19, 2005

I have a database which has one main form linked to a table which has 325 records in it. The problem is when you open the form it says there are only 324 records :confused:
I have gone through the table comparing the records with the form records, I found what I thought was the 'missing' record. But when I did a find on the form I managed to retrieve the record.
Can anyone help as I'm a bit baffled.

Thanks
S

View 6 Replies View Related

Showing User Who Modified Record On Form View

Dec 29, 2004

I used a macro to record the date and time the current record was modified and show that information on a form - the information on how I did that is here: http://office.microsoft.com/en-us/a...0345351033.aspx

That works wonderfully, however I would like to add to this the user that modified the record.

Is there a macro code for this??

I tried setting the Item to read [UserModified] and the Expression to be User() however that did not work.

Any help would be greatly appreciated...

thanks.

View 2 Replies View Related

Reports :: Open A Report But Only Showing The Result Of One Record In A Sub Form?

Jun 21, 2013

i want to open a report but only showing the result of one record in a sub form,

i have a field that is on all rows of the subform,[click to run] and what i want the user to be able to do is double click on this field and it will open the report with only the record information for that row displayed.

View 1 Replies View Related

Change The Sub Form’s Record Source

Nov 16, 2005

I have a main form that has 10 sub forms Each sub form’s record source is link to a different Query.

It takes more then a minute to open the form, (because it’s running the query for all sub forms). So I changed the sub forms source to SELECT * FROM tblTest WHERE false;

I also changed the main form. When the button on the main form is clicked, it’s adding the following:

Me.SubMySub.Form.RecordSource = "select * from qMyQuery"
Me. SubMySub.Form.Requery

However, after I close the main form, the sub form’s record source stays linked to
SELECT * FROM qMyQuery;

And will take the same long time again to open the main form.

Does anyone have any solution?

View 7 Replies View Related

Run A Macro On Change Of Record On A Form

Feb 23, 2008

Hi!
Is it possible to run a Macro each time the user changes the Record on the Form? If so how? :confused:

View 2 Replies View Related

Change The Active Record On The Form

Jun 23, 2007

hi
I want to set record selector on the form with a record number that I am founding it with this code:
Code:Dim con As ADODB.ConnectionDim cmd As ADODB.CommandDim rst As ADODB.RecordsetSet con = New ADODB.ConnectionSet cmd = New ADODB.CommandSet rst = New ADODB.Recordsetcon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CurrentProject.Path & "hazineh-bime.mdb" & ";Persist Security Info=False" cmd.CommandText = "select * from table1 where salp=" & Val(Trim(Form_mainhazineh.sal.Value)) & " and mahp=" & (Trim(Form_mainhazineh.mah.Value)) & " " Set cmd.ActiveConnection = con rst.Open cmd, , 1, adLockReadOnly If rst.RecordCount = 1 Then ' found the record else end if
I mean I want to change the active record on the form with another one .
how can I do it?

View 3 Replies View Related

How To Change The Record Source Of A Report From A Form

Sep 22, 2005

I'm looking to change the record source of a report and then print the report depending on what button the user clicks on.

Is there some way to do this?

View 8 Replies View Related

Input Fields To Change Record Details On A Form?

Aug 17, 2005

I have a query with the fields employee_name, shiftname, shiftdate and have set it up so that 2 input messages boxes popup allowing the user to input a shiftname (a,b,c) then a shiftdate. from this query i have created a form, but instead of having 2 message boxes popup on screen before the form is loaded is it possible to have 2 input fields on the form (one for shift date & one for shiftname) that allows the user to enter into these fileds whenever they wish provided the form is open and all the records bellow change matching the employee name with the corresponding shiftname & date?, any advice would be great.

View 4 Replies View Related

Forms :: Update ListBox On Record Change In Form

Apr 30, 2014

I have a form with a listbox in it. I want the listbox to update as the record changes.Let me get a little more in-depth...The form will be used to identify merchandise that exists in the company to fulfill current POs.

What I want is for the listbox (which displays Store Locations) to update when the PO# updates on the form (so as the record changes).Currently, the listbox only pulls all the store locations no matter if you hit next record to get a new PO.The two main fields I am working with are PO# (text box) and Store Locations (the listbox).How can I get the listbox to update as the record changes on the form?

View 1 Replies View Related

General :: Error In ID Field Of Form - Cannot Add Or Change A Record

Aug 6, 2012

I'm setting up a college database. On my enrollment form i have the following fields

Enrolment_ID
Student_ID
Course_ID

I'm receiving the error in my Student_ID field. It's telling me a related record is required in my Student Table.

The drop down shows the student name/date of birth/Education number

But if i set it to just show the ID it works fine, is there a work around for this as it will make life a lot easier for the dropdown to display the student names rather than the ID?

The dropdown is based on a query i have of accepted students....

View 2 Replies View Related

Forms :: Duplicating Tabbed Form And Change Record Source

Aug 7, 2014

I have a navigation form that has a tabbed form on one of its tabs. The tabbed form has a 'current client' query record source and allows one to choose from a list of current clients and when a client is selected - details relating to client are displayed on various tabs on tabbed form.

I want to duplicate tabbed form and change record source to a query selecting 'exited clients' so I can see same information but for exited clients.

I have created a new tab on navigation form for my new exited clients tabbed form and changed record source by creating a new exited client query but when I change record source on exited client tabbed form it automatically changes record source of current client tabbed form to the exited client query and visa versa.

View 3 Replies View Related

Forms :: Continuous Form - Change Color Of Single Record

May 1, 2014

I have a continuous form based on a orders table and a details sub form.I list all the records in a continuos form in date of order.i need to change the colour of a single record based on the condition of a tick box on the original orders form

View 1 Replies View Related

Forms :: Continuous Form - One Field Change Background Color / Current Record

Jul 28, 2014

in a continuous form i want to click on one record and have the one field change the background colour to highlight it. When I use the code: Field. BackColor = vbYellow it changes the background on all the records. Is there a code to say only for the record with focus?

View 1 Replies View Related

Forms :: Change Backcolor Of A Field On Current Record Displayed In Multiple Items Form

Apr 8, 2013

I wish to change the backcolor of a field on a current record being dispalyed in a 'multiple items' form. However when using me.A.backcolor = makes refrence to all fields called A on the 'multiple items' form and therefore all fields change colour not just the current record.

View 2 Replies View Related

Showing Last Record

Sep 6, 2004

hi all,

i have question about showing last record in a form. i have 2 table, ra and repair tables. each ra_id is consists of many repair. each repair have time and date stamped. I want to show in tabular view all of the ra records including the last update of each repair per ra_id in a form. When I select some fields in ra + time in repair table, the form showing only records that has repairs ONLY, but not all records. And also display time BUT not the last update, instead showing ALL repairs. can any one help, if i want to show all records plus time but ONLY the last update on the repair. I don't know much vba, so please tell me what to do in macro or expression builder????

View 1 Replies View Related

Any Way Of Not Showing The Blank Record?

Oct 20, 2004

I've got a text box, populated by a query.
(it looks like a list because it's tabular view)

you can always see the empty record... any way you can stop it showing?

or failing that, I have a dblclick event on all the textboxes. But It doesn't work with the blank record..

this is quite frustrating.. any help please?

View 5 Replies View Related

Showing First And Last Record In A Group

Aug 30, 2005

I have a database in Access 2000 that contains multiple entries for each individual - in this case they are 'visits'. I wish to create a query that shows the first and last visit only on any particular day for each individual.

Can anyone help me?

View 7 Replies View Related

Forms :: Showing More Than One Record

Dec 26, 2013

After setting the source of a from to a table, a form shows a blank record and allows you to input one row of record at a time.But is it possible to have the form show a specific number of blank records, say 6, on each page of the form?I want the user to enter 6 new different records on just 1 page of the form without using the navigation buttons to move between records.

I need to design a database system for students to choose their modules.Each student needs to choose exactly 6 modules and I want the student to input all their 6 choices on 1 page of form, instead of using the navigation buttons to switch to a blank record to input each module.

View 14 Replies View Related

"You Cannot Add Or Change A Record Because A Related Record Is Required In Table....

Aug 1, 2006

Hi! Please help!!!

I'm currently building a bookings database and have encountered an alert message that I cant seem to rectify -

"You cannot add or change a record because a related record is required in the table 'Booking Details'"

Basically - I have a 'Customer Database' form that is linked (via command button) to a 'Booking Details' form. Within 'Booking Details' I have 2 sub forms - 'Booking Quote' and 'Booking Payments'. Both subforms are linked to the 'Booking Details' form by the 'booking ref' field with RI.

I have no problem updating information in the 'Booking Quote' subform, but when I try to add information to 'Booking Payments' it states the above message.

Can anyone please advise as to how I can prevent this happening? I'm slowly losing my mind....!!!

Many thanks,

Stacey

View 10 Replies View Related

Tables :: Cannot Add Or Change A Record Because A Related Record Is Required In Table

Oct 22, 2012

Currently I keep getting this error: "You cannot add or change a record because a related record is required in table"..My current tables are this:

Primary Table with persons info:

Primary Key - Auto number generated
Name
Address
Email
Phone

I have 4 other tables with use check boxes.

ex:

Table 1 - Geographic locations visited

ID - Auto generated
USA
CANADA
ASIA
ECT...

Table 2 - Languages Spoken
ID - Auto generated
Spanish
Chinese
English

Table 3 - Skills
ID - Auto generated
Hunting
Dance
Singing
Weaving

Is this not a genuine one-to-one relationship table? I mean No two people would have had visited the same places and speak the same language no? I tried to create a one to one relationship with the primary key to the auto generated ID of the child tables but I'm sure that is not how you do it. Also when I try to save the check boxes in my form and I close it and come back it doesnt save and is blank again. Is it because my form gets its information from a query that takes all the information from all the tables.

how I can get this to work properly? Am i to make use of a foreign key? I've read a lot about it online and watched youtube videos but I dont see why I need it here in this case. Is there a way to set the IDs in the child tables to be the ones from the primary table? Or do I have to use a foreign key and manually input the primary ID into them?

Or would it be better to have all these child tables in the primary table and have one large table instead? I just didnt do that because one of them has like 20 checkboxes with cities and locations

View 12 Replies View Related

Some Record Not Showing On Query.something Wrong?

Oct 27, 2007

I have make relational table on query, but some record not sohowing on query, although i have the record on table.

for example, i can't see the record with code :
131401.007
541000.00*

is the anything wrong?

thanks

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved