Joshua B
lists at jbsolutions.com.au
Mon Jul 5 21:08:40 CDT 2004
Nevermind, figured it out. I needed to set the attribute before appending... ======= At 2004-07-06, 11:21:00 I wrote: ======= >Hi Group > >Hoping someone can help me out here, I'm trying to create a Hyperlink Field in a table via VBA (Access 2K), the code looks like this... > >'=====================Begin Code >Function addHyperlinkField(strDB as String) > >Dim db As DAO.Database >Dim tbl As DAO.TableDef >Dim newfld As DAO.Field > > >Set db = OpenDatabase(strDB) > >Set tbl = db.TableDefs("tbl_Clients") >Set newfld = tbl.CreateField("clnt_Website2", dbMemo, 233) >tbl.Fields.Append newfld >newfld.Attributes = dbHyperlinkField > >End Function >'=====================End Code > >The code bombs out on the last line and gives me Error 3219 - "Invalid Operation". If anyone has any ideas, it would be most appreciated. = = = = = = = = = = = = = = = = = = = = Best regards. Joshua B lists at jbsolutions.com.au www.jbsolutions.com.au 2004-07-06