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

How can I reflect changes to table

I have an unbound form, whose combobox and textboxes are also unbound.

The form's record source is a query (getdata) .
It has combo box whose rowsource is the same query. The afterupdate event for the combobox assigns a column from the query, (Document_Control_Number), + 1, to a textbox in the form.

When the form is submitted, the values are added into the table, but when I make a selection in the combobox, it does not use the updated Document_Control_Number to assign a value to the textbox

I want the form to reflect the changes in the table.

I tried Form.requery, but this didn't seem to work.
Does anybody have a suggestion?
Oct 16 '08 #1
2 2442
missinglinq
3,532 Expert 2GB
I have an unbound form, whose combobox and textboxes are also unbound...

The form's record source is a query (getdata) .
I think we'd all be interested to know how you did this! If the form has a record source, by definition, the form is bound, not unbound! Which begs the question of why have a bound form with unbound textboxes?

We need to know whether your form is bound or not and whether your textboxes are bound or not. Also how are you "submitting the form?"


Linq ;0)>
Oct 16 '08 #2
I think we'd all be interested to know how you did this! If the form has a record source, by definition, the form is bound, not unbound! Which begs the question of why have a bound form with unbound textboxes?

We need to know whether your form is bound or not and whether your textboxes are bound or not. Also how are you "submitting the form?"


Linq ;0)>
Thank you for the reply Linq. I used a solution that is working: Upon submitting the form, I run a macro to close and open the form, and the updated value in the table is reflected. I dont know if this is the best solution.

I actually was using a record source for the form but it turned out the form works the same without that record source. The form is unbound, and the textboxes and comboboxes are all unbound.

To submit the form, it connected to the database and opens the table, then adds each of the object values to the table fields. Here is some code:

Set cnn1 = New ADODB.Connection
mydb = "H:\DataManagement.mdb"
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mydb
cnn1.Open strCnn

' Open Document Control Table table.
Set rstdatamanagement = New ADODB.Recordset
rstdatamanagement.CursorType = adOpenKeyset
rstdatamanagement.LockType = adLockOptimistic
rstdatamanagement.Open "tblDocumentControl", cnn1, , , adCmdTable


'get the new record data
rstdatamanagement.AddNew
rstdatamanagement!Document_Control_Number = Document_Control_Number
rstdatamanagement!Doc_Type_Num = Doc_Type_Num.Column(0)
rstdatamanagement!Document_Name = Document_Name
.
.
rstdatamanagement.Update
Oct 21 '08 #3

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

Similar topics

0
by: Gill Bates | last post by:
so DOM calls should be calculated from Diff. Possible? How? (some URLs please) I guess this is in most cases not very efficient, but here's why: I have a data Document at the server. From...
0
by: Eric Sykes | last post by:
After installing VSNet for several reasons I had to restore the system to before the VSNet installation. I reinstalled VSNet no problem but now when I open up VSNet a message pops up saying "Help...
8
by: McKirahan | last post by:
Firefox does not reflect selected option via innerHTML How do I get Firefox to reflect selected option values? <html> <head> <title>FFinner.htm</title> <script type="text/javascript">...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
1
by: vios | last post by:
Hi, I have created a trigger as below to update a table called vnd_trail to show what sort of operation(update/delete) happened to the name column. My problem is, I want to have another column to...
1
by: =?Utf-8?B?QnJhbmRvbg==?= | last post by:
Hi, I have an aspx page that contains an include section which calls an html page for text to be displayed on the aspx page. I also have an upload page that allows users to upload a simple html...
0
by: AliRezaGoogle | last post by:
Dear members, I have a datagrid and a textbox on my form. I bound both of them to a common datasource( an arbitrary datatable). When I change a text inside textbox I expect that value of same...
1
by: AliRezaGoogle | last post by:
Dear Group, I have a SQL Server 2000 databse with some tables. The tables contents are modified by many users at the same time. When I fetch some rows from a table via dataset into my application...
0
by: \Ji Zhou [MSFT]\ | last post by:
Hello Ashutosh, I see your points. As to your two new concerns, I am give the detailed comments in the following. 1. Is it possible to achieve this result without calling Update on the route...
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...
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,...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.