ac2007 form caption (1 Viewer)

roosn

Registered User.
Local time
Today, 08:22
Joined
Jul 29, 2005
Messages
121
Hi
How do you set the form caption for an access 2007 form

i have moved from ac2003 to 2007, and now the form caption names have disappeared.
in ac2003 i could get [database name] - [form caption]
now i just get the [database name]

thanks

roosn
 

boblarson

Smeghead
Local time
Today, 00:22
Joined
Jan 12, 2001
Messages
32,059
You set the caption the same way you did before, but you probably have to do this as well.
 

roosn

Registered User.
Local time
Today, 08:22
Joined
Jul 29, 2005
Messages
121
Hi Bob

thank you for your reply, checked the access options, they were as you had linked

i am using

Me.Form.Caption = rs.Fields("ref_rev_complete").Value,

in load and or open function, but still no joy

Ross
 

boblarson

Smeghead
Local time
Today, 00:22
Joined
Jan 12, 2001
Messages
32,059
Hi Bob

thank you for your reply, checked the access options, they were as you had linked

i am using

Me.Form.Caption = rs.Fields("ref_rev_complete").Value,

in load and or open function, but still no joy

Ross

1. You can't use the Open event (unless you are using a completely different recordset) because the form's recordset is not loaded yet.

2. What is the full code you are trying to use? Where do you declare and set rs
 

roosn

Registered User.
Local time
Today, 08:22
Joined
Jul 29, 2005
Messages
121
Hi Bob

i use unbound forms and ADO connections

cn.ConnectionString = ADO_connection
cn.Open

Set rs = New ADODB.Recordset

Set cmd = New ADODB.Command

cmd.ActiveConnection = cn
cmd.CommandType = adCmdText

cmd.CommandText = "SELECT .......

cmd.Execute

rs.Open cmd

Me.Form.Caption = rs.Fields("ref_rev_complete").Value

rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing

but even if i just did

Me.Form.Caption = "test"

it still doesnt work, never a problem in ac2003

BR
 

Users who are viewing this thread

Top Bottom