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

Making Edit in Form Changes All..But Shouldn't

294 256MB
I am outputting Hours worked on a specific line of business of a specific company on a certain date, and sending them to a 'Submitted Hours' form. The Line of Business box is editable only by an Admin, however, when it is changed, it changes all of the records, not just that single instance.

I've attached 2 images, one before the change and one after.

Keep in mind, I only want 1 LOB to change.

If I can provide anything else, let me know.

I feel as though it might be something with the pairing keys, or a query, however everything else works in the database aside from this, so I am hesitant to make changes.

Thanks.


Attached Images
File Type: png 11.PNG (18.3 KB, 433 views)
File Type: png 12.PNG (17.6 KB, 516 views)
Aug 23 '13 #1

✓ answered by zmbd

mcupito,

Your Combobox for LOB in the form should have the
"control source" property set to be equal to the field in the table that you are storing the data in... appears to be ServiceTempTble![ServiceTempLOB]
With the way it is currently, LOB_tbl![LOB_Abbr] you are editing the LOB_tbl and not the value in the ServiceTempTble![ServiceTempLOB] field. This is why when you changed the value in one record all of the others changed.


Now, You have to change the rowsource of combobox so that is uses the related data.

From what I figure out from your post, you could use the LOB_tbl as the rowsorce or write a query that is either stored or entered directly into the Rowsorce property.
You need to then set the bound column to be equal to the related field (looks like [LOB_ID]), set the number of columns to match the record sorce and the column widths to 0;1;1 (the first needs to be zero if you want to hide the column the remaining values should match the number of columns)

So now the bound column is what is stored in the table.

11 1284
nico5038
3,080 Expert 2GB
Looks like there's no unique identifier and in a continues form Access doesn't limit such a selection to the current record.....
As a workaround, when updating, you can right-click the date and then the company to apply a filter so only one row is displayed.
Then update the field.

Or ask the programmer to correct his design :-)

Nic;o)
Aug 23 '13 #2
mcupito
294 256MB
I am the 'programmer' .. I took over a partially completed database and didn't even know this form was editable. I am thinking that there is a mismatched connection, however, other than the editing - all of the output is fine. There is an append query that goes to the form, so I am questioning if that could be a source of issue.
Aug 23 '13 #3
TheSmileyCoder
2,322 Expert Mod 2GB
A append query cannot "go" to a form. An append query adds records to a table.

A form can show a table or a SELECT query. The table could have been created by an append query, or had records added to it by an append query, but a form cannot show an append query.

I am guessing that you have 2 or more tables joined together and instead of editing the master table, you are accidentally editing the lookup table.

Try to google for some help on how to create a combobox using a lookup table, and see if that doesn't clarify it for you.
Aug 23 '13 #4
nico5038
3,080 Expert 2GB
I would start with making this form `read only` by setting the property to allow no edits.
Somewhere there must be a form to update Company and ServiceDate and enter the LOB. There this should be maintained.

Nico
Aug 23 '13 #5
jimatqsi
1,271 Expert 1GB
mcupito,you've given precious little information to help us understand your problem. Are you working with a form and a sub-form? Or do you have an unbound text box on a continuous form?

Show us what you're working with, not just the result of what you're working with. Give us a screen shot of the work area. Maybe even you can zip the .mdb and let us look at the process first-hand.

Jim
Aug 23 '13 #6
mcupito
294 256MB
I have taken a few new screen shots in hopes of giving you all better information. I wish I could zip the .mdb, however it contains lawyer's names, which I will not disclose.

When editing the LoB for a row in the ServiceHoursSbform (Yes, it's a subform), it changes all of the LOB's that are the same, to the one that was changed - AND it changes them in the tables also. That is why I believe it might be some kind of relationship issue.



Attached Images
File Type: jpg LoB1.jpg (69.5 KB, 388 views)
File Type: png ServiceHoursSubfrm_Tbl.PNG (10.1 KB, 338 views)
File Type: jpg Relationships.jpg (22.2 KB, 454 views)
Aug 26 '13 #7
mcupito
294 256MB
Nico, this form IS the form where editing is to be done. It is the output from an 'InputHoursFrm' where all of this information is entered and this form is where it can be recalled/is being stored.

Thanks all,
Mark
Aug 26 '13 #8
mcupito
294 256MB
All, I am not sure if this is possible, but can I make the LOB column a ComboBox, BUT** have it populated with the result (before ANY editing is done) and have the other LOB's listed in the ComboBox? I will post a screen shot.

E.g: For the first entry, I want it to read CORP in the LoB, but I want there to be a list of other possible LoB's in the ComboBox, and if one is selected it would replace CORP only for that row (entry) of data.

Basically, I want the ComboBox in the LoB column to say 'CORP' because that is potentially the correct information, however if someone entered it wrong and it was supposed to be "XYZ", I want "XYZ" to be an option in the ComboBox.

I really hope this helps - I am so close to finishing this segment.

Thanks all - very, very much.

Attached Images
File Type: png ServiceHrsFrm.PNG (27.8 KB, 377 views)
Aug 26 '13 #9
nico5038
3,080 Expert 2GB
I see your modelling is wrong.
You'll need to link the service to the unique LOB ID and drop the relation between service and company.
Otherwise you're changing the relation between Company and LOB instead of assigning another LOB to a service.

The company for a service can always be found by linking from the LOB to the Company.

Getting the idea ?

Nic;o)
Aug 26 '13 #10
zmbd
5,501 Expert Mod 4TB
mcupito,

Your Combobox for LOB in the form should have the
"control source" property set to be equal to the field in the table that you are storing the data in... appears to be ServiceTempTble![ServiceTempLOB]
With the way it is currently, LOB_tbl![LOB_Abbr] you are editing the LOB_tbl and not the value in the ServiceTempTble![ServiceTempLOB] field. This is why when you changed the value in one record all of the others changed.


Now, You have to change the rowsource of combobox so that is uses the related data.

From what I figure out from your post, you could use the LOB_tbl as the rowsorce or write a query that is either stored or entered directly into the Rowsorce property.
You need to then set the bound column to be equal to the related field (looks like [LOB_ID]), set the number of columns to match the record sorce and the column widths to 0;1;1 (the first needs to be zero if you want to hide the column the remaining values should match the number of columns)

So now the bound column is what is stored in the table.
Aug 26 '13 #11
mcupito
294 256MB
Thank you all for your contributions. I believe zmbd was correct (not in the combobox aspect) in the connectivity. I do not believe it should have been the LOB_ID in the field.

Thank you all, again. You've been great
Sep 4 '13 #12

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

Similar topics

0
by: Al | last post by:
hi I have a Datagrid where I click on the id to open another aspx page to edit the selected record. I was able to pass the selected row's id and use it in the second page to pull the record into...
2
by: lorirobn | last post by:
Hi, I have a continuous form which displays all the records on a table. The detail row has a command button which, if pressed, takes the user to another form where that record can be edited. ...
2
by: Jack | last post by:
Hi, I got a edit form in a asp application which allows multiple record edit from the same page. The edit screen works great to a point. I developed this application on my laptop(15"). However,...
1
by: panwala_bhavesh | last post by:
Thanks for any help - I have a form to enter records. It works fine. It is crowded with over 30 fields. It has as its datasource a table (maybe it should be a query of that table?). What I want to...
2
by: Parasyke | last post by:
Please help.... I have a form that I successfully add records to that I want to copy and turn into a form for editing records from that same table (It is imperitive that it be done this way, rather...
0
by: Howie | last post by:
Hi all. Hope you can help. I have created a form to edit existing records. I want to do two things: 1/ When the form opens, I want it to give a search field (searching on a string) which then...
6
jwagener
by: jwagener | last post by:
Hi, I am building a content menager/news manager and am having trouble with my edit page. I have never embarked on a project like this before and am a bit of noob to php and mysql development....
1
by: chromis | last post by:
Hi, I'm having trouble fully implementing the edit section of a contact admin system, so far I have written the following: - Bean (Contact.cfc) - Data Access object (ContactDAO.cfc) - Gateway...
1
by: natalie84 | last post by:
Here it goes.... I am using ASP. language: VB I have 2 database as follows.... Database1: User_Details User_ID | User_Name ST-David | David John PUP-Peter | Peter Soh ST-Kelvin | Kelvin Tan ...
1
by: Bigdaddrock | last post by:
I currently have a form to allow changes to a record in a Table. Sometimes, if the user has entered some changes, but then changes their mind, is there a way that I can allow them to close the form...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.