473,387 Members | 1,799 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,387 software developers and data experts.

Edit only selected record on a subform

I have a Maniform with a sub form attached to it, when ever people enter the data and save, all the records in the sub form with turn to "Allowedits = False" – This is the code that has been given on Button_Click.

But I need the re-enable edit only selected records on the sub form

Example: If I have 10 records in a sub form, and want to re-enable only the selected records (say 1 and 2 are selected records), how to do that with Access VBA

Please help

Thanks in advance
Feb 11 '11 #1
3 2425
Presumably you can cycle through the records on the subform? Why not place the record numbers to edit in an array then in the subform oncurrent event (tells you which record is displayed) use code to enable editing or not depending on if the current record matches a record number in your array.
Feb 11 '11 #2
malcolmk,

Thanks for the reply,

Can you please give me a code as an example, with the below details

Main Form Name - frm_details
Subform Name - sub_frm_details

Thanks in advance
Feb 16 '11 #3
How are you selecting the records to allow edit on? If you persue my idea above then you need to have some method of putting the record id into an array. Are you planning to select records from a dropdown box? If i work on some code then I must know from where on the main form I get the record id for edit? or maybe the records to allow edit are defined elsewhere?
Feb 18 '11 #4

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

Similar topics

3
by: deko | last post by:
I have a form with a subform datasheet - I need code behind the OnDelete event of the subform: Private Sub Form_Delete(Cancel As Integer) 'do something that depends on which record is deleted...
7
by: ChrisR | last post by:
Hi guys My app is a simple Main form with a few Subforms that are not linked, and a few pop forms. Problem is: I have a pop form with a Listbox with a list of records related to the...
12
by: daniel | last post by:
Hi All, I have a form and VB code in Access. The code is like With rs .Edit !Field = 10 .Update End With
2
by: dbuchanan | last post by:
Hello, I want to open a child form based on the record selected in a dataGridView of the parent form. I want the child form to open with a populated child table based on the selected parent...
1
by: sonasiva | last post by:
Dear all Iam using ASP i need to edit a record i have 4data fields as follows name companyname date percentage First user have to enter "name ,comapanyname and date" in th form...
7
by: KiwiGenie | last post by:
I have a form which lists selected records, there could be anything from 1 record to all records selected. I want to output a report for each record as HTML. I want each file to take its name from a...
2
by: ndeeley | last post by:
Hello, I've not had a lot of luck getting this to work, despite looking around lots of websites, so here goes... I have a main form frmProjectScheduler. It's a tabbed form and the front page is...
1
by: Bob | last post by:
Hello, Using VB 2005.net. I have a bound datagridview and a delete button control (or when the user pressed the 'Delete' key) I can successfully delete the selected record from the table and...
1
by: gurmet | last post by:
Hi All I have been looking around for help, and finally post this problem. I created a form to edit a record. Before i can click save button on the edit form i need to check if the data that...
7
by: =?Utf-8?B?SnVsaWEgQg==?= | last post by:
Hi all, this is a second post, so apologies, but I never had an answer to my first post (several weeks ago) and I really need some help. I'm using a .Net 2.0 Gridview which is populated using an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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,...

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.