Problems saving imported data in a new table

nigi

New member
Local time
Today, 17:55
Joined
Jul 14, 2004
Messages
7
Hi, all!

I´m self learned and a bit of a novice so bear with me...

When a user wants to enter a new post, the first thing they have to do is fill in a message box promting them for an id-number. When they fill this in, my program is supposed to take that id and fetch a couple of items from another databse within our company and display them in textboxes on the main form, in order to make the users fill in as few text boxes as possible. So far everything is fine, but here comes my problem.

I haven´t been able to save the values that I fetched from the external database within the table of the main form.

The connection works fine, I use a query to get the specific values I want to display based on the user input, I display them in the proper textboxes but I can not figure out how I save them in my own table togehter with the other values the user fills in for the particular post. I have been trying the differnt kinds of querys without success. I guess it´s a simple problem but at the moment I´m stuck!

Any help would be greatly appreciated!
 
Check the control source within Properties of the Text Boxes that are not saving. This should reflect the Table Field Name into which the data should be saved

L
 
Thanks for the reply, Len!

I tried your suggestion, but it doesn´t work to my satisfaction. The reason for this is that the control source currently is set to the iported tables field that I want to fetch. If I change the control source to the place I want to save the data the program doesn´t find the value from the imported table.
 
Okay. I am not greatly knowledgeable in this area but perhaps a workaround is required.

Could you have additional Text fields that have their control source where you want to save and then a query or function that updates the value of these new text boxes to the value shown in the import text boxes.

Len
 
Heh!

Your suggestion is exactly what I´m trying to pull off at the moment, Len.

My idea is to let the "imported text boxes" be "visible = false" and then copy their contents to another set of textboxes that has their control source set to the table I want them to be saved in. It ain´t pretty, but...

If anyone has any concrete suggestions (i.e. code) that does this it would be great, or better yet if anyone have a better looking proposal that would be fantastic. It seems someone must have had the same problem...
 
Users very seldom see or appreciate the artistry and plain magic that Developers create so that they have a wonderful application that prevents the dozy buggers totally screwing up their own data so what they cannot see do not tell them about, pretty or not.


Sometimes it's just a matter of time before Flash, bang and inspiration takes the place of perspiration.

;) ;)

L
 
The little workaround I proposed earlier works in my head but not in VBA...

What I want to do is to move the content of one textbox to another, but the problem is I´m new to procedural programming. The problem would be solved in the blink of an eye in Java...

My code looks like this:

Private Sub Form_Load()
Dim a
a = Me.cust_id
Me.customer_id.SetFocus 'Don´t know if it´s necessary to set focus.
Me.customer_id. = a
End Sub

...and it doesn´t work.

It says "This object can´t be given a value". ( I think it means Me.customer_id).

The errorcode is the slightly amsuing set of numbers: "-2147352567 (80020009)"
 
Think cos at On Load there is no data available.

Think about the Got Focus property of the field at Tab Stop 0

Use Event Procedure something like

[Text_New]=[Text_Import]

Not exactly flash with this myself but probably needs a bit of experiment or an Expert will post the correct way to do it

L

Edit
[Text_New] may need a refresh of some kind
 
Last edited:
Damn! It still doesn´t work.

I´ve been moving the code around and triend all things I can think of, but no success.

Thanks anyway Len.
 
1) Does the new text box get updated okay

if so

2) Add a button on form and use the wizard to make it a button that will save record.

Check exactly what get saved

3) Double check the record source for the new text boxes

Len
 

Users who are viewing this thread

Back
Top Bottom