Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Html link in subform

Post Reply
Fundi
Posts: 27
Joined: Sun Apr 17, 2011 10:22 pm

Html link in subform

Unread post by Fundi »

Hi

I'm busy unlearning things from my access past yet trying to come to similar results. nuBuilder is great.

1. How would anyone in nuBuilder take the content of one or two fields in a subform and put it in a third field on the subform or outside the subform.?
In M$-Access you could say Me.Form!Field3 = Me.Form!Field1 & " "& me.Form!Field2

2. What is the best way to put a html reference in a field on a subform so that when the user click on it it will go there. Subforms do not allow html code.

Any insights would help me a lot.
Fundi
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Html link in subform

Unread post by admin »

Fundi,
Subforms do not allow html code.
I think what you mean is JavaScript (not html) and you can put JavaScript on objects in subforms.
if you want something like.

Code: Select all

Me.Form!Field3 = Me.Form!Field1 & " "& me.Form!Field2
HTML is static where as Access can reflet changes as above automatically (like a spreadsheet)
Updating changes on a HTML page needs JavaScript to be run on an event eg. When Field1 or Field2 get changed.

This would be done like this..

Code: Select all

var prefix = nuGetRow();
document.getElementById(prefix+'Field3').value = document.getElementById(prefix+'Field1').value + ' ' + document.getElementById(prefix+'Field2').value;
and would go here...
change.PNG
BUT

This won't automatically populate these fields when the page loads.

To do that you must make Field3 a Display object

with SQL something like this

Code: Select all

SELECT CONCAT(Field1,' ',Field2) FROM tablename WHERE table_id = '#id#'
and put it here..
disp.PNG
There are other simpler ways to do it but they will only show changes after a record is saved.

For little things like this Access is easier to use but in most things nuBuilder is a much faster tool.

Steven
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Html link in subform

Unread post by admin »

On your other question,
if you put this in the doubleclick event of a text object

Code: Select all

window.open(this.value);
it will try to open up any thing in that text field.


Steven
Post Reply